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

getRootElement() fails when rootElement is an element #403

Closed
apellerano-pw opened this issue Aug 3, 2018 · 2 comments
Closed

getRootElement() fails when rootElement is an element #403

apellerano-pw opened this issue Aug 3, 2018 · 2 comments
Labels

Comments

@apellerano-pw
Copy link
Contributor

The rootElement documentation states it can be an element or a selector string, but getRootElement() only works with selector strings.

https://emberjs.com/api/ember/3.3/classes/Application/properties/rootElement?anchor=rootElement

We were testing out shadow DOM stuff in chrome and using an initializer to create the shadow DOM and then point rootElement to an element inside the shadow DOM. Unfortunately tests don't work because get-root-element.js only works when rootElement is a string that can be passed to a querySelector.

https://github.com/emberjs/ember-test-helpers/blob/master/addon-test-support/%40ember/test-helpers/dom/get-root-element.js#L21

If it's useful I can build an Ember Twiddle showing the crash

@rwjblue
Copy link
Member

rwjblue commented Aug 3, 2018

Welp. Thats just silly. Good catch, mind taking a shot at fixing?

@apellerano-pw
Copy link
Contributor Author

Yeah I'll see what I can do

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

No branches or pull requests

2 participants