Next steps for Blink-in-JS

115 views
Skip to first unread message

Kentaro Hara

unread,
Nov 10, 2014, 7:58:39 PM11/10/14
to blink-dev
Hi

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.

(*) See haraken’s slide at BlinkOn 3 (https://docs.google.com/a/google.com/presentation/d/1-5wpqeIltM40DAZdQBhbqnzOZuFNezS4eUfx1T4YV50/edit#slide=id.g437b0e633_00) for a background of this guideline. At the session in BlinkOn3, it seems we are in agreement with the guideline.

(**) 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?


Christian Biesinger

unread,
Nov 11, 2014, 5:44:29 PM11/11/14
to Kentaro Hara, blink-dev
Why do MediaControls need a new implementation instead of using the existing cross-platform one?

-christian

Kentaro Hara

unread,
Nov 11, 2014, 8:04:04 PM11/11/14
to Christian Biesinger, blink-dev
Why do MediaControls need a new implementation instead of using the existing cross-platform one?

As mentioned in the first email, MediaControls-in-JS is just an example scenario and not intending to imply that we want to do that. Let's discuss that in an Intent-to-Implement for MediaControls-in-JS :)


--
Kentaro Hara, Tokyo, Japan

Kentaro Hara

unread,
Nov 12, 2014, 9:29:59 PM11/12/14
to Christian Biesinger, blink-dev
I added the guideline of Blink-in-JS to the Chromium Site page:

If you are currently implementing or planning to implement something-in-JS, let's send an Intent-to-implement to blink-dev@!




Reply all
Reply to author
Forward
0 new messages