Skip to content

add custom elements detection - #2155

Merged
ryanseddon merged 1 commit into
Modernizr:masterfrom
lukasoppermann:custom-elements
Mar 9, 2017
Merged

add custom elements detection#2155
ryanseddon merged 1 commit into
Modernizr:masterfrom
lukasoppermann:custom-elements

Conversation

@lukasoppermann

Copy link
Copy Markdown
Contributor

This is the first draft to address #2140.

However, I am at a loss as to how I should add test to test the detection. @ryanseddon could you please advise? Thanks.

Comment thread feature-detects/custom-elements.js Outdated
Detects support for the Custom Elements API, to create custom html elements via js
*/
define(['Modernizr'], function(Modernizr) {
Modernizr.addTest('customelements', typeof window.customElements === 'undefined');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

'customElements' in window should be fine

@lukasoppermann

Copy link
Copy Markdown
Contributor Author

Thanks @ryanseddon, changed it.

@ryanseddon

Copy link
Copy Markdown
Member

However, I am at a loss as to how I should add test to test the detection. @ryanseddon could you please advise?

What do you mean by this?

@ryanseddon

Copy link
Copy Markdown
Member

I think you reverted your change to config-all.json too

@lukasoppermann

Copy link
Copy Markdown
Contributor Author

Hey @ryanseddon, I never changed config-all.json, added a change now.

However, I am at a loss as to how I should add test to test the detection. @ryanseddon could you please advise?

What do you mean by this?

Well, I was wondering if there is a test to test, that the supportTest is correct?

@lukasoppermann

Copy link
Copy Markdown
Contributor Author

Hey @ryanseddon can this be merged now?

@ryanseddon
ryanseddon merged commit 99b6566 into Modernizr:master Mar 9, 2017
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