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

DOMStat Audit: shadow roots don't have .classList #2131

Merged
merged 3 commits into from
May 3, 2017
Merged

DOMStat Audit: shadow roots don't have .classList #2131

merged 3 commits into from
May 3, 2017

Conversation

ebidel
Copy link
Contributor

@ebidel ebidel commented May 3, 2017

R: all

Fixes #1986.

@ebidel ebidel changed the title DOMStat Audit: handle shadow roots (dont have .classList) DOMStat Audit: shadow roots don't have .classList May 3, 2017
Copy link
Member

@paulirish paulirish left a comment

Choose a reason for hiding this comment

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

lgtm % nit

node.parentNode.localName !== 'a';
node = shadowHost ? node.parentNode.host : node.parentElement;
if (ShadowRoot.prototype.isPrototypeOf(node)) {
const shadowHost = node.host && node.localName !== 'a';
Copy link
Member

Choose a reason for hiding this comment

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

nit: shadowHost => isShadowHost

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@ebidel ebidel merged commit d3a0692 into master May 3, 2017
@ebidel ebidel deleted the domfix branch May 3, 2017 04:11
paulirish pushed a commit to paulirish/lighthouse that referenced this pull request May 5, 2017
* DOMStat Audit: handle shadow roots (dont have .classList)

* Users should target < optimalVal

* isShadowHost
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.

None yet

2 participants