If those features need a private API, those APIs are unlikely to be ever exposed to the web platform, nor are they temporary. Still, we will need to add them.
I don't want to add temporary APIs - if we don't want to have them in the end, just don't add them.
If those features need a private API, those APIs are unlikely to be ever exposed to the web platform, nor are they temporary. Still, we will need to add them.So if a private script API is needed to move second-class citizens to Blink-in-JS, do you think that it is OK to approve the private script API?I think that's something abarth@ and esprehn@ want to avoid. I also think that we shouldn't add random private script APIs even if the APIs are for second-class citizens, because one of the goals of Blink-in-JS is to make the web layering better. That's why we abandoned MediaControls-in-JS (because it requires intrusive private script APIs). The key part of VTT-in-JS is also how to factor out VTT from C++ without adding intrusive private script APIs.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
If those features need a private API, those APIs are unlikely to be ever exposed to the web platform, nor are they temporary. Still, we will need to add them.So if a private script API is needed to move second-class citizens to Blink-in-JS, do you think that it is OK to approve the private script API?
I think that's something abarth@ and esprehn@ want to avoid. I also think that we shouldn't add random private script APIs even if the APIs are for second-class citizens, because one of the goals of Blink-in-JS is to make the web layering better. That's why we abandoned MediaControls-in-JS (because it requires intrusive private script APIs). The key part of VTT-in-JS is also how to factor out VTT from C++ without adding intrusive private script APIs.
I don't want to add temporary APIs - if we don't want to have them in the end, just don't add them.That would depend on a meaning of "temporary", but my point is that I want to avoid a situation where we have to block Blink-in-JS work until we fix some web-exposed APIs, we get full use counters from the wild, we implement a new resource scheme like chrome-resource:// etc. The CLs I listed in the first email are blocked by such situations. They know an ideal solution which doesn't require private script APIs, but it takes time to get there, so they want to add private script APIs temporarily.
(That being said, you won't need to buy this discussion because if you simply approve private script APIs for second-class citizens,
you can approve all private script APIs in those CLs. Thus the problem doesn't exist anymore (without discussing whether we should allow temporary APIs or not).)
So Jochen's suggestion is:- A private script API is allowed if the API is needed for moving second-class citizens to Blink-in-JS. (Of course, the private script API is the last resort and we should try our best to avoid it.)
Also, I only consider XSLT to be a second-class citizen out of the examples you provided.
If an API is "temporary" as in, there's a better solution that takes longer, we should go for the better solution always.
That is fine, however, I don't see how this will make a big difference whether I disagree on this thread, or on the intent-to-implement threads.
That is fine, however, I don't see how this will make a big difference whether I disagree on this thread, or on the intent-to-implement threads.
It's fine you disagree with (for example) execCommand-in-JS. If majority of the Blink people have the same thought, we should stop the work. Otherwise, we can proceed with the work.I'm not intending to convince you about execCommand-in-JS. I'm intending to solve a problem that multiple people are actually blocked in Blink-in-JS work because the decision-making process is unclear. I think it is helpful to have a good rule to decide go or non-go, and if it is go, there should be a way to support smooth development.
should we include the APIs you want to use in the intent-to-implement?
I chatted with a couple of folks offline. We're all in agreement in that Blink-in-JS is a good thing if it doesn't require any private script API. We need a good guideline about private script APIs. We need to balance the following two facts:- We should not mess up the platform by adding private script APIs. A private script API is a bad thing in both philosophy and practice.- We should move Blink-in-JS work forward with fewer engineering resources. It is not productive to spend a lot of time in moving will-be-deprecated features to Blink-in-JS.Here is a revised version of the guideline:====================- If you plan to implement a feature in Blink-in-JS, you need to send an intent-to-implement to blink-dev@ and get a consensus.- You need to try your best to implement Blink-in-JS without relying on private script APIs. If you really need to add a private script API, you need to get an LGTM from one API owner. The private script API must meet either of the following conditions:(a) The private script API is a missing part of the current web and going to be exposed to the web in the future.(b) The private script API is for supporting a will-be-deprecated feature.====================The revised guideline is more strict than the one I proposed based on the discussion with jochen. Even if we are in agreement on moving a feature to Blink-in-JS, a private script API is not approved unless the API meets either of the above conditions.The condition (a) is needed not to block Blink-in-JS work until the API is actually exposed to the web. One example is Element.createUserAgentShadowRoot(). It is clear that we cannot implement built-in elements (like <marquee>) without having a way to create a private shadow root. Otherwise, the contents of the shadow root are exposed to the web. ThusElement.createUserAgentShadowRoot() is considered to be a missing part of the current web. However, historically speaking, we rejected the idea of having an API to create a private shadow root as a result of a ton of discussions about the shadow DOM spec. Given the history, it wouldn't be that easy to actually expose the API to the web in a reasonable timeline. We should definitely give the feedback to the working group or public-webapps@ but don't want to block the Blink-in-JS work until the API is actually exposed to the web.
> The condition (a) is needed not to block Blink-in-JS work until the API is actually exposed to the web. One example is Element.createUserAgentShadowRoot(). It is clear that we cannot implement built-in elements (like <marquee>) without having a way to create a private shadow root. Otherwise, the contents of the shadow root are exposed to the web. Thus
> Element.createUserAgentShadowRoot() is considered to be a missing part of the current web. However, historically speaking, we rejected the idea of having an API to create a private shadow root as a result of a ton of discussions about the shadow DOM spec. Given the history, it wouldn't be that easy to actually expose the API to the web in a reasonable timeline. We should definitely give the feedback to the working group or public-webapps@ but don't want to block the Blink-in-JS work until the API is actually exposed to the web.
Errr.. I was with you until this paragraph :)
FWIW, This is just a straight matter of fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20144. There's wide consensus in public-webapps that closed shadow trees are a useful primitive.
> The condition (a) is needed not to block Blink-in-JS work until the API is actually exposed to the web. One example is Element.createUserAgentShadowRoot(). It is clear that we cannot implement built-in elements (like <marquee>) without having a way to create a private shadow root. Otherwise, the contents of the shadow root are exposed to the web. Thus
> Element.createUserAgentShadowRoot() is considered to be a missing part of the current web. However, historically speaking, we rejected the idea of having an API to create a private shadow root as a result of a ton of discussions about the shadow DOM spec. Given the history, it wouldn't be that easy to actually expose the API to the web in a reasonable timeline. We should definitely give the feedback to the working group or public-webapps@ but don't want to block the Blink-in-JS work until the API is actually exposed to the web.
Errr.. I was with you until this paragraph :)
FWIW, This is just a straight matter of fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20144. There's wide consensus in public-webapps that closed shadow trees are a useful primitive.Oh, that's great news! :)The key point here would be whether it is allowed to add Element.createUserAgentShadowRoot() as a private script API and move marquee-in-JS forward instead of fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=20144 (assuming that fixing the bug is a substantial amount of work).
:DG<
I chatted with a couple of folks offline. We're all in agreement in that
Blink-in-JS is a good thing if it doesn't require any private script API. We need a good guideline about private script APIs. We need to balance the following two facts:- We should not mess up the platform by adding private script APIs. A private script API is a bad thing in both philosophy and practice.- We should move Blink-in-JS work forward with fewer engineering resources. It is not productive to spend a lot of time in moving will-be-deprecated features to Blink-in-JS.Here is a revised version of the guideline:====================- If you plan to implement a feature in Blink-in-JS, you need to send an intent-to-implement to blink-dev@ and get a consensus.
- You need to try your best to implement Blink-in-JS without relying on private script APIs. If you really need to add a private script API, you need to get an LGTM from one API owner. The private script API must meet either of the following conditions:(a) The private script API is a missing part of the current web and going to be exposed to the web in the future.
(b) The private script API is for supporting a will-be-deprecated feature.====================The revised guideline is more strict than the one I proposed based on the discussion with jochen. Even if we are in agreement on moving a feature to Blink-in-JS, a private script API is not approved unless the API meets either of the above conditions.The condition (a) is needed not to block Blink-in-JS work until the API is actually exposed to the web. One example is Element.createUserAgentShadowRoot(). It is clear that we cannot implement built-in elements (like <marquee>) without having a way to create a private shadow root. Otherwise, the contents of the shadow root are exposed to the web. ThusElement.createUserAgentShadowRoot() is considered to be a missing part of the current web. However, historically speaking, we rejected the idea of having an API to create a private shadow root as a result of a ton of discussions about the shadow DOM spec. Given the history, it wouldn't be that easy to actually expose the API to the web in a reasonable timeline. We should definitely give the feedback to the working group or public-webapps@ but don't want to block the Blink-in-JS work until the API is actually exposed to the web.The condition (b) is needed to move features Blink wants to deprecate but cannot deprecate right away to Blink-in-JS. XSLT is a good example for this, and we need ProcessingInstruction.onProcessingInstructionAvailable() to implement XSLT-in-JS. The API is considered to be a missing part of the web platform to implement something like XSLT, but clearly, it doesn't make sense to try to expose the API to the web because we want to deprecate XSLT. What we should do here is to deprecate XSLT instead of exposing the API to support XSLT. The condition (b) covers such cases.Another thing we need to care about is how to handle APIs for Blink specific purposes. For example, execCommand-in-JS wants an API for UseCounter. UseCounter is a notion of Blink and not a part of the web.
Another example is APIs that will be added to connect Blink-in-JS with Mojo. These APIs are not a part of the web either. I think these APIs are
> ====================
> - If you plan to implement a feature in Blink-in-JS, you need to send an intent-to-implement to blink-dev@ and get a consensus.
With the reasoning above, should this be an intent to deprecate instead?
> - You need to try your best to implement Blink-in-JS without relying on private script APIs. If you really need to add a private script API, you need to get an LGTM from one API owner. The private script API must meet either of the following conditions:
>
> (a) The private script API is a missing part of the current web and going to be exposed to the web in the future.
We should not add such APIs
> Another thing we need to care about is how to handle APIs for Blink specific purposes. For example, execCommand-in-JS wants an API for UseCounter. UseCounter is a notion of Blink and not a part of the web.
Last time this was discussed, we reached the conclusion to not add an API for this.
On Sun, Oct 19, 2014 at 9:04 AM, Elliott Sprehn <esp...@chromium.org> wrote:t
> ====================
> - If you plan to implement a feature in Blink-in-JS, you need to send an intent-to-implement to blink-dev@ and get a consensus.
With the reasoning above, should this be an intent to deprecate instead?Not really. As discussed above, the goal of Blink-in-JS is not limited to will-be-deprecated features. execCommand-in-JS is one example (even though you disagree with it), and Mojo-with-Blink-in-JS would be another example.> - You need to try your best to implement Blink-in-JS without relying on private script APIs. If you really need to add a private script API, you need to get an LGTM from one API owner. The private script API must meet either of the following conditions:
>
> (a) The private script API is a missing part of the current web and going to be exposed to the web in the future.
We should not add such APIs> Yes, it is blocking some projects. But if the platform is not good enough to allow for implementing these features on top of it, I'd claim it's a higher priority to fix the platform than to proceed with these projects.I agree with you that that is the world we should reach in the end, but it is important to get to the world in the fastest path. In that sense:
So, perhaps the policy can just be that blink-in-JS is free to make use of experimental web platform features? But, as always (and perhaps with some extra discipline), experimental platform feature should either be on a clear path to shipping or being deleted.
Should we take one of the remaining free slots at blinkon3 so everybody interested can join the discussion?
I agree that having an intent to implement email is a good thing, however, I will push back against private APIs that satisfy (a):- I think we should not invest effort into adding private APIs for missing web features, we should invest effort into implementing missing web features
- For experimenting with or learning about the platform, we should use branches, and not trunk.
I like the idea behind Rick's proposal to use experimental APIs, however, in practice I fear this will lead to code explosion in bindings.
-mike
There's risk in the other direction too. When we implement high-level features in C++ with hooks into whatever system reviewers will tolerate, we can deceive ourselves into thinking it's OK with arguments like "frameworks should never need this ability - this code is special". If we make the bar too high, people will just avoid using blink-in-js and further exacerbate the monolithic nature of our platform and code base.
Instead I hope we can strike a good balance that encourages people to try to build their feature on top of primitives, and incrementally works towards refining those primitives into part of web platform. That can help advance the platform in ways we might not predict (a "special case" often turns out not to be so special after discussion with people who see related special cases). I've seen this process be pretty valuable in other traditional platforms (eg. co-evolution of the windows kernel with applications/frameworks).
> - For experimenting with or learning about the platform, we should use branches, and not trunk.
Hrm. What's the bar here? My impression is that we've been pretty lax with our intent to implement process; when should something bake on a branch before landing in trunk?
I think the bar should be lower for APIs which have a small impact on
the platform, like:
- Element.createUserAgentShadowRoot (which is very similar to
createShadowRoot, and exercises a capability we already rely on for
other features),
- UseCounter (which is useful elsewhere in Blink and Chromium, and for
which an alternate implementation could easily be supplied by someone
else), and
- callbacks to a C++ class which logically "owns" the Blink-in-JS one
(for instance, someone who wanted to reuse the shadow DOM plugin
placeholder code could map these to whatever behaviour they desired)
I'm also not sure I understand how Mojo fits into this discussion. I
may be missing context, but it sounds like we're saying "private
bindings are bad, but private Mojo services are good". I'm not sure
what the difference is here, except that one is declared in a .idl
file and the other in a .mojom file, one is located through property
access and the other through navigator.connect, etc.