Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: include.preload.js

Issue 6289175791796224: Issue 343 - Fix element hiding in Chrome 35 (Closed)
Patch Set: Created April 16, 2014, 5:06 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -34,8 +34,18 @@
shadow.appendChild(document.createElement("shadow"));
shadow.appendChild(style);
- for (var i = 0; i < selectors.length; i++)
- selectors[i] = "::-webkit-distributed(" + selectors[i] + ")";
+ try
+ {
+ document.querySelector("::content");
+
+ for (var i = 0; i < selectors.length; i++)
+ selectors[i] = "::content " + selectors[i];
+ }
+ catch (e)
+ {
+ for (var i = 0; i < selectors.length; i++)
+ selectors[i] = "::-webkit-distributed(" + selectors[i] + ")";
+ }
}
else
{
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld