The problem was we don't currently chain callbacks like rendered and parented when a class and superclass have different implementations. The plumbing here is all rather arbitrary, considering our inheritance model is not finalized (and we may even do away with it, a la React) and "parented" is at best an undocumented but usable peer to "rendered".
Renamed the "parented" signal from DomRange to Component "notifyParented".
Puts HTML.Tag, toHTML, and toJS in the "htmljs" package.
Introduces toText for textareas and attributes.
Changes dynamic attribute representation.
Instances of HTML.Tag, HTML.CharRef, etc. are now "instanceof".
Once this code seems to work, we'll move packages around further.
- "htmljs" is the runtime; can even take out "tocode.js"
- "html-tools" (new package) takes over for "html".
Then, port the tests.
This commit does the minimum to switch to the new renderer,
by mapping .html to html2_scanner. Now we have to remove
all the references to "2" and all the old dead code, of course.
Our use of emboxValue breaks test-in-browser pretty severely
by assuming that in `{{#each results}}`, if `results` is `===`
to what it was last time, then there is no change. In fact,
test-in-browser mutates arrays and expects invalidating the
result to cause a re-render.
We used to test that `{{toString}}` is undefined on a fresh
template, but now it resolves as a helper, along with
various other bits of name pollution that we can't tell
apart from real helpers/methods now that we search the
prototype chain, like `{{data}}`, `{{events}}`, `{{kind}}`,
and so on. We should do something about that at some point.