Adventures in GSoC 2

Written on Jun 19, 2017 by Connor

During the last week, I finished up the remaining work on implementing the [HTMLConstructor] WebIDL extended attribute and implemented custom elements into element creation.

Pull Requests:


As I finished up the remaining work on #17224, I began to focus on the create an element steps which was the original goal for this week and last week according to my roadmap.

After [HTMLConstructor] was implemented, the implementation for the create and element steps was straightforward.

The first step was to add a lookup by local name method for the CustomElementRegistry and use that to find any custom element definition if one exists when creating an element.

The next step was to add a method to CustomElementDefinition which constructs a new element from the definition. When creating a new element, this method is used under the following conditions:

  1. The definition is for an Autonomous Custom Element.
  2. The synchronous custom elements flag is set.

If those conditions are unmet and a custom element definition was found, a custom element upgrade reaction is used to setup the custom element. I have not implemented reactions or upgrades yet, so I left this portion unimplemented.

I also added the beginning support for the is attribute and wired up the synchronous custom elements flag.

Next Steps

According to the roadmap, the next step is to implement custom element reactions (June 18 - July 1).

This includes the following:

  1. Validating and storing lifecycle callbacks and observed attributes when a new custom element is defined.
  2. Implementing the various custom element reaction queues.
  3. Enqueueing the callback reactions where appropriate.

This does not include implementing upgrade reactions or the [CEReactions] WebIDL extended attribute.