This is (an in-progress tinkering) about rationalizing and layering of the web platform APIs that reach outside of the box that is commonly called the rendering engine. Let's call these APIs system APIs for the purpose of this project.
For concepts and simplistic introduction, see the What's Beneath Bedrock? presentation, originally given at the Extensible Web Summit.
In primitive terms, the tubes view all system APIs as having two distinct layers:
MessagePort
and a protocol to communicate with this port. The port is the actual manifestation of the system API in the web platform.The sugar layer uses the pipes layer and should be implementable in plain JS.
MessagePort
+ message-passing protocol) to express these strategies.There needs to be a simple (as simple as possible) standards process around implementing a pipes layer API. A quick sketch:
There likely be other places of developing standard practices and patterns (error handling, etc.).
The tubes makes this distinction between the platform and the user agent:
Some of these decisions are made due to implementation deficiencies (when the browser doesn't support a feature, for example), and some are made as a result of negotiating the balance of power between the user and the author (for instance, when the user does not want the author to have information or control, exposed by a feature).
In this vein, it is up to the user agent to answer the questions on whether a given pipes layer API is accessible to the author. One simplistic pattern would be for the user agent to install a valve in front of the primordial MessagePort
: something that looks like the primordial MessagePort
, but actually has a whitelist of pipes layer APIs that are deemed safe, and fails when an "unsafe" API is requested.
Some vendors (such as Cordova) would never want to block any of pipes layer, and some vendors would want to block most if not all of them. This is okay.
See API.md for API explorations.