Skip to content

Prevent errors when document.documentElement.dataset is not present.#475

Merged
teddyzeenny merged 1 commit intoemberjs:masterfrom
rwjblue:prevent-missing-dataset-from-erroring
Oct 1, 2015
Merged

Prevent errors when document.documentElement.dataset is not present.#475
teddyzeenny merged 1 commit intoemberjs:masterfrom
rwjblue:prevent-missing-dataset-from-erroring

Conversation

@rwjblue
Copy link
Copy Markdown
Member

@rwjblue rwjblue commented Sep 30, 2015

If document.documentElement does not have a dataset property we will never mark the content script as loaded (and it cannot be an Ember app) this happens in some scenarios with Chrome 45+ and SVG elements.

Fixes #463
Closes #473

@rwjblue
Copy link
Copy Markdown
Member Author

rwjblue commented Sep 30, 2015

@teddyzeenny - Should be ready for review...

Comment thread ember_debug/adapters/basic.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code wouldn't execute if it's not an Ember app.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, so you are saying that we do not need to guard here?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirm

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@rwjblue rwjblue force-pushed the prevent-missing-dataset-from-erroring branch from 1be5d0b to a0dc523 Compare October 1, 2015 13:10
Comment thread skeleton_chrome/content-script.js Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update the comment?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

if `document.documentElement` does not have a `dataset` property we
will never mark the content script as loaded (and it cannot be an Ember app)
this happens in some scenarios with Chrome 45+ and SVG elements.
@rwjblue rwjblue force-pushed the prevent-missing-dataset-from-erroring branch from a0dc523 to 89c9c86 Compare October 1, 2015 13:26
teddyzeenny added a commit that referenced this pull request Oct 1, 2015
…oring

Prevent errors when document.documentElement.dataset is not present.
@teddyzeenny teddyzeenny merged commit d6b8a25 into emberjs:master Oct 1, 2015
@teddyzeenny
Copy link
Copy Markdown
Contributor

Thank you!!

@rwjblue rwjblue deleted the prevent-missing-dataset-from-erroring branch October 1, 2015 13:35
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.

2 participants