Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use getDOM util to get dom reference in glimmer2 #65

Merged
merged 1 commit into from
Sep 6, 2016

Conversation

bantic
Copy link
Contributor

@bantic bantic commented Sep 6, 2016

When using ember canary (2.9.x), the this.renderer._dom property no
longer exists. This adds a util function to get access to the dom
property in a way that works in both contexts.

This makes it so ember-wormhole works correctly in ember canary 2.9.x when rendered in the browser, but there are some issues with ember-cli-fastboot
and ember canary (ember-fastboot/ember-cli-fastboot#258 and ember-fastboot/ember-cli-fastboot#255) that are not related to ember-wormhole. The code in this PR will work with ember canary and fastboot after those issues are resolved.

Fixes #64

When using ember canary (2.9.x), the `this.renderer._dom` property no
longer exists. This adds a util function to get access to the `dom`
property in a way that works in both contexts.

Fixes yapplabs#64
@lukemelia
Copy link
Contributor

Awesome, thanks for this @bantic. 👍

@lukemelia lukemelia merged commit 95df99a into yapplabs:master Sep 6, 2016
@cibernox
Copy link
Collaborator

cibernox commented Sep 6, 2016

Thank you sir!

@bantic bantic deleted the bantic/64-glimmer2-rendering branch September 6, 2016 18:07
@lukemelia
Copy link
Contributor

@krisselden
Copy link
Contributor

Are we just console hacking? I'm pretty certain the document used is available in both with the same container key

@cibernox
Copy link
Collaborator

@krisselden when I opened the issue ~2w ago I can assure that this.renderer._dom; wasn't there.

@bantic
Copy link
Contributor Author

bantic commented Sep 12, 2016

@krisselden @cibernox Yes, I can confirm — this.render._dom wasn't around in glimmer2 components when I worked on this.

@krisselden
Copy link
Contributor

@bantic that is not what I meant

you are wanting document.createTextNode

document has been available as service:-document since before glimmer 2, this is still not public, but at least it is more stable and less indirect through many private APIs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Glimmer] Doesn't work in canary since glimmer was enabled
4 participants