Closed josemarluedke closed 8 years ago
Thanks for testing this out! I believe we need to detect if these monkey patches are needed and simply do nothing if they are not.
I do not think the DOMHelper monkey patch is needed for 2.7+ of Ember (though @tomdale and/or @ronco may need to confirm the exact version).
@rwjblue Where does the behavior that is being monkeypatched by FastBoot live now?
The two monkeypatches are protocolForUrl
and parseHTML
.
prototcolForUrl
is now in ember-glimmer/lib/protocol-for-url.js
, and appears to be Fastboot/Node-compatible.
I'm not sure where parseHTML
is called, but I don't see a replacement for it in the ember.js codebase.
cc @tomdale
@bantic parseHTML
is used when you have unescaped dynamic values aka {{{triple-curlies}}}
. In the browser we parse the HTML and insert the resulting fragment into the DOM as-is. In FastBoot, we use a non-standard SimpleDOM API for adding "raw" HTML that just gets serialized out directly without an intermediate parsing step.
@chancancode @chadhietala Is the plan of record to maintain a Node-compatible DOMHelper in Glimmer? If so, I think we can safely remove this monkeypatch for newer versions.
@tomdale yes
@chancancode @chadhietala Is the plan of record to maintain a Node-compatible DOMHelper in Glimmer? If so, I think we can safely remove this monkeypatch for newer versions.
Yes, that is what I was trying to say in https://github.com/ember-fastboot/ember-cli-fastboot/issues/255#issuecomment-243615562:
I believe we need to detect if these monkey patches are needed and simply do nothing if they are not.
Per request from @rwjblue.
I tried to use ember-cli-fastboot (beta 8) with the latest ember canary with glimmer enabled by default and we get an error from this line.
My test app is at: https://github.com/josemarluedke/glimmer2-fastboot-try
The logs are: