diff --git a/src/dom.js b/src/dom.js index e465d7ae2d25a..4307b41a6ba58 100644 --- a/src/dom.js +++ b/src/dom.js @@ -395,7 +395,7 @@ export function scopedQuerySelector(root, selector) { } // Only IE. - const unique = `i-amphtml-scoped-${Math.random()}`; + const unique = `i-amphtml-scoped-${Date.now()}`; root.classList.add(unique); const elements = root./*OK*/querySelector(`.${unique} ${selector}`); root.classList.remove(unique); @@ -418,7 +418,7 @@ export function scopedQuerySelectorAll(root, selector) { } // Only IE. - const unique = `i-amphtml-scoped-${Math.random()}`; + const unique = `i-amphtml-scoped-${Date.now()}`; root.classList.add(unique); const elements = toArray(root./*OK*/querySelectorAll(`.${unique} ${selector}`)); root.classList.remove(unique);