Skip to content
This repository was archived by the owner on Oct 2, 2018. It is now read-only.

Commit 1d5aa09

Browse files
committed
Polyfill template element in l10n.js for Firefox OS 1.1
1 parent a645aa0 commit 1d5aa09

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

scripts/lib/l10n.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2362,6 +2362,15 @@
23622362
// `element` but such that `element`'s own children are not replaced
23632363
var translation = element.ownerDocument.createElement('template');
23642364
translation.innerHTML = value;
2365+
// polyfill html5 template element for Firefox OS 1.1 (added by Firetext)
2366+
if (!('content' in translation)) {
2367+
translation.content = element.ownerDocument.createDocumentFragment();
2368+
var childElement;
2369+
while ((childElement = translation.childNodes[0])) {
2370+
translation.removeChild(childElement);
2371+
translation.content.appendChild(childElement);
2372+
}
2373+
}
23652374
// overlay the node with the DocumentFragment
23662375
overlayElement(element, translation.content);
23672376
}

0 commit comments

Comments
 (0)