On 12/2/15 5:42 PM, Ryan Sleevi wrote:
On Wednesday, December 2, 2015 at 1:17:46 PM UTC-8, smaug wrote:
I don't understand how 1) could be implemented when the spec has left the key
piece undefined, as far as I see.
As the spec puts it "This specification does not describe how such a port is
made available to RP web pages, as this is (for now) implementation and
browser dependent. "
Um, that's fairly standard for specs.
It's not standard for web specs, in the sense that web specs aim to have
interoperable behavior in terms of what's exposed to pages.
That means not just defining how objects behave once you have your hands
on them but also defining how to get your hands on them. The
alternative is things like when pages were creating XMLHttpRequest
objects via constructors in some browsers and ActiveX gunk in others: no
one is happy with that.
Now I know you know all this, so I'm assuming you simply misunderstood
Olli's objection... but if that's not what's going on, I would like to
understand what your line of reasoning is here.
The spec defines the interface, as well as the observable behaviours
of that interface. How that interface is implemented is up to the UA.
The "interface" for a typical web spec includes "how do I, as a web
author, get the objects this spec is defining".
For example, Chrome "implements" the interface by allowing extensions
to inject JS into pages, and allowing said JS to communicate back to
the extension ( see https://developer.chrome.com/extensions/messaging
). A future, 'native' implementation in Chrome could, rather than
using extension, directly expose the IDL via the navigator interface,
which then exposes a JS MessagePort that fulfills the contract.
Here's my question. From the point of view of a web author, do these
look like the same interface? That is, are injections adding members to
navigator?
The text you cite is by no means proof of an 'incomplete' spec
It sure sounds like it is to me.
rather, it's standard spec sauce, the same way that, say, WebGL
doesn't say "You must use NVidia driver 3.0 or later, and only on
Intel machines" - it says "This is the API of WebGL - you can
implement it however you wish, so long as you abide by this contract"
The API of WebGL also says that the way you get hold of a
WebGLRenderingContext is via a getContext() call on an
HTMLCanvasElement, with certain arguments. Without that part, the WebGL
spec would in fact be "incomplete".
-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform