Basic example to research isomorphic metal.js usage
Execute node index.js
to run the example
-
metal-component::Component
depends onDomEventEmitterProxy
andtoElement
frommetal-dom
; -
metal-incremental-dom::attributes
depends ondelegate
frommetal-dom
-
metal-incremental-dom::patch
depends onappend
andexitDocument
frommetal-dom
-
metal-incremental-dom::render
depends ondomData
frommetal-dom
These dependencies are just in the way, but not necessarily needed in the
rendering path. In a simplistic exercise, just commenting the metal-dom
imports and its usages renders ListJSX
properly.
-
metal-soy::Soy
depends onHTML2IncDom
fromhtml2incdom
which tries to set and accessHTMLParser
globally
In this case, on top of the changes for JSX, simply using global
to
export/import the parser, or properly wrapping it in a module fixes the issue
and renders ListSoy
properly.