I had a session of Blink-in-JS at BlinkOn 3 and discussed a guideline of Blink-in-JS. Also I met up with some of us (dglazkov, chrishtr, jochen) and looked at the benefits, costs, and risks of the Blink-in-JS project. As a result, I’m thinking about the following strategy for next steps of Blink-in-JS:
We keep the Blink-in-JS project forward with the following guideline (*) but lower the priority of the project, considering priorities of other on-going projects in Blink:
1) If you plan to implement a feature in Blink-in-JS, you need to send an Intent-to-Implement to blink-dev@. The Intent-to-Implement should explain the advantages of the Blink-in-JS and have a list of private script APIs that will be required for the Blink-in-JS. (**)
2) You are strongly discouraged to use private script APIs. If you need to add a private script API, you need to provide a justification for the API and get an LGTM from one API owner (***). The API must meet either of the following conditions:
- The API is a missing part of the current web and going to be exposed to the web in the future.
- The API is for supporting a will-be-deprecated feature.
(**) The fact that we’re lowering the priority of Blink-in-JS means that we are going to be conservative about accepting your Intent-to-Implement. It is important to consider if your Blink-in-JS work has higher impact than other projects you could work on alternately. The Intent-to-Implement must provide clear advantages of why you think it is important for Blink to implement the feature in Blink-in-JS. For example, the following Intent-to-Implements look appealing:
- I need to implement MediaControls for Android. There are two options for us: implement it in C++ or implement it in JS. Given that MediaControls is a self-contained and high-level feature that can be developed on top of existing web-exposed API, I propose to implement MediaControls in Blink-in-JS. It is easier to develop and maintain.
- XMLViewer is already written in JS and it is invoked using direct V8 APIs. Given that Blink-in-JS has a safer mechanism to run JS in Blink, I propose to move XMLViewer to Blink-in-JS.
- I plan to make a substantial restructuring of the rendering system for performance. I noticed that marquee-specific code in the rendering system prevents us from making the restructuring. Given that marquee is an out-dated feature, I want to just factor out the implementation to Blink-in-JS instead of supporting the marquee-specific code in the new rendering system.
On the other hand, the following Intent-to-Implement would not be appealing:
- HTMLFormControls are self-contained and it is not hard to move the implementation to Blink-in-JS. The benefit is that we can remove a bunch of code from C++. However, I’m not sure if HTMLFormControls is an actively developed area and thus it’s not clear at this point how helpful it is for on-going Blink projects.
(Note: These are just examples and not intending to imply go or non-go of MediaControls-in-JS etc)
(***) It is a good idea to ask review for dglazkov@ (API owner), jochen@ (API owner), haraken@ and area experts of the API.
What do you think?