-
Notifications
You must be signed in to change notification settings - Fork 27.2k
Closed
Description
The compiler relies on the browser to parse the HTML into DOM. It than walks the DOM to detect the directives, expressions, and statements. In order to be able to run the compiler outside the browser we need to refactor the code to remove the DOM dependency. This should be pretty straight forward, since the compiler already uses a facade to talk to DOM (since JS and Dart APIs are different)
Work needed:
- HTML Parser which would crete a tree. (This is performed by browser HTML parser) The tree does not have to be DOM.
- Create facade for the tree model created in step 1, which allows the compiler to walk the tree.
- Remove all cyclic dependencies
Compiler operations are limited to:
- reading element name
- reading attributes
- reading text nodes
- walking the tree using
.firstChildand.nextSibling - removing and re-wrapping subtrees into
<template>tags.
Once the above work is completed the compiler will be able to execute outside the browser environment.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels