-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Including platform.js breaks YouTube's iframe API #468
Comments
What browser and version are you using? In Chrome 35 I get that error every time I use an invalid selector, no matter if platform.js is present or not: document.body.webkitMatchesSelector('x:y');
// SyntaxError: Failed to execute 'webkitMatchesSelector' on 'Element': 'x:y' is not a valid selector. (same thing happens with matches) document.body.matches('x:y');
// SyntaxError: Failed to execute 'matches' on 'Element': 'x:y' is not a valid selector. and document.createElement('x:y').matches('x:y')
// SyntaxError: Failed to execute 'matches' on 'Element': 'x:y' is not a valid selector. |
I'm on Chrome 33. However, I've just tried Chrome 36 and am never getting the error, regardless of whether platform.js is included or not! |
I think the problem here is that ShadowDOM polyfill uses |
That sounds likely. I'll provide a patch. |
Instead of relying on CSS selectors, this now implements the matching as described by dom.spec.whatwg.org Fixes Polymer/polymer#468
Instead of relying on CSS selectors, this now implements the matching as described by dom.spec.whatwg.org Fixes Polymer/polymer#468
Instead of relying on CSS selectors, this now implements the matching as described by dom.spec.whatwg.org Fixes Polymer/polymer#468
Instead of relying on CSS selectors, this now implements the matching as described by dom.spec.whatwg.org Fixes Polymer/polymer#468
I've been playing around with Polymer for a few days now and it's awesome, thanks! Apologies if this is not an issue with Polymer, but rather YouTube's API.
Including platform.js on a page that is making use of YouTube's iframe API causes the following: Uncaught SyntaxError: Failed to execute 'webkitMatchesSelector' on 'Element': 'yt:player' is not a valid selector.
Here is a test case the reproduces the issue (removing the inclusion of platform.js on line 4 fixes the problem):
The text was updated successfully, but these errors were encountered: