dglazkov/html-as-custom-elements — pull request #36 by domenic (2014-10-31 22:52:32+00:00)
Title: Add initial <custom-a>, with a demo page

It isn't terribly functional in a user-facing way right now, but the `URLUtils` properties all work, which is great. Mostly would be interested in review of the approach.

Commit message:

Makes use of several new webidl-class-generator features: `implements`, `[CustomElementCallbacks]`, and `[NoConversion]`.

Introduces our first "mixin," `URLUtils`. This gives us a direct manifestation of the `URLUtils` interface from the URL Standard, and how it relates to `HTMLAnchorElement`. In particular, we reify the mixin's "set the input" algorithm and the mixin target's "get the base" and "update steps" algorithms.

Introduces new infrastructure for private methods, used to allow `URLUtils` to access `CustomHTMLAnchorElement`'s "get the base" and "update steps" algorithms (which are indeed conceptually private methods).

Introduces a wrapper around `document.registerElement` that deals with a few pitfalls stemming from custom elements' ES6 integration being incomplete, as well as the need to delete the custom element callbacks.

The way private instance state is handled by URLUtils is somewhat disappointing, but will do for now.

Added a demo page, which can be launched with `npm run demo`. It uses the beefy package to do most of the work. Right now it's very crude, and was mainly used as a way for me to verify that the various properties of the `` element were working and debug them while they weren't. We can use it to create a more impressive demo of `` as it evolves capabilities.