moved template polyfill
This commit is contained in:
parent
ed3ef9e384
commit
14696ac278
|
@ -25,6 +25,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -130,30 +130,3 @@
|
|||
}
|
||||
});
|
||||
}());
|
||||
|
||||
/* Template element polyfill */
|
||||
(function templatePolyfill(d) {
|
||||
if('content' in d.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var qPlates = d.getElementsByTagName('template'),
|
||||
plateLen = qPlates.length,
|
||||
elPlate,
|
||||
qContent,
|
||||
contentLen,
|
||||
docContent;
|
||||
|
||||
for(var x=0; x<plateLen; ++x) {
|
||||
elPlate = qPlates[x];
|
||||
qContent = elPlate.childNodes;
|
||||
contentLen = qContent.length;
|
||||
docContent = d.createDocumentFragment();
|
||||
|
||||
while(qContent[0]) {
|
||||
docContent.appendChild(qContent[0]);
|
||||
}
|
||||
|
||||
elPlate.content = docContent;
|
||||
}
|
||||
})(document);
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
@ -523,7 +546,6 @@ toggle.addEventListener('click', (e) => {
|
|||
|
||||
var launchButton = document.querySelector('[data-launch="js-demo-414e06a48e755bf9e43e5e2596f9ea7a"]');
|
||||
launchButton.addEventListener('click', function () {
|
||||
var demoContent = template.content;
|
||||
var standalone = window.open();
|
||||
script.textContent = standaloneScript;
|
||||
standalone.document.body.appendChild(template.content.cloneNode(true));
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
@ -1897,7 +1920,6 @@ toggle.addEventListener('click', (e) => {
|
|||
|
||||
var launchButton = document.querySelector('[data-launch="js-demo-414e06a48e755bf9e43e5e2596f9ea7a"]');
|
||||
launchButton.addEventListener('click', function () {
|
||||
var demoContent = template.content;
|
||||
var standalone = window.open();
|
||||
script.textContent = standaloneScript;
|
||||
standalone.document.body.appendChild(template.content.cloneNode(true));
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.css">
|
||||
<script>
|
||||
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -24,6 +24,29 @@
|
|||
<link href="https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700" rel="stylesheet" media="none" onload="this.media='all';">
|
||||
<link rel="stylesheet" href="{{ "css/prism.css" | absURL }}">
|
||||
<link rel="stylesheet" type="text/css" href="{{ "css/styles.css" | absURL }}">
|
||||
<script>
|
||||
/* Template element polyfill */
|
||||
(function templatePolyfill(document) {
|
||||
if ('content' in document.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var templates = document.getElementsByTagName('template');
|
||||
var plateLen = templates.length;
|
||||
|
||||
for (var x = 0; x < plateLen; ++x) {
|
||||
var template = templates[x];
|
||||
var content = template.childNodes;
|
||||
var fragment = document.createDocumentFragment();
|
||||
|
||||
while (content[0]) {
|
||||
fragment.appendChild(content[0]);
|
||||
}
|
||||
|
||||
template.content = fragment;
|
||||
}
|
||||
})(document);
|
||||
</script>
|
||||
<style id="inverter" media="none">
|
||||
html { filter: invert(100%) }
|
||||
* { background-color: inherit }
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
|
||||
var launchButton = document.querySelector('[data-launch="js-demo-{{ $uniq }}"]');
|
||||
launchButton.addEventListener('click', function () {
|
||||
var demoContent = template.content;
|
||||
var standalone = window.open();
|
||||
script.textContent = standaloneScript;
|
||||
standalone.document.body.appendChild(template.content.cloneNode(true));
|
||||
|
|
|
@ -130,30 +130,3 @@
|
|||
}
|
||||
});
|
||||
}());
|
||||
|
||||
/* Template element polyfill */
|
||||
(function templatePolyfill(d) {
|
||||
if('content' in d.createElement('template')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var qPlates = d.getElementsByTagName('template'),
|
||||
plateLen = qPlates.length,
|
||||
elPlate,
|
||||
qContent,
|
||||
contentLen,
|
||||
docContent;
|
||||
|
||||
for(var x=0; x<plateLen; ++x) {
|
||||
elPlate = qPlates[x];
|
||||
qContent = elPlate.childNodes;
|
||||
contentLen = qContent.length;
|
||||
docContent = d.createDocumentFragment();
|
||||
|
||||
while(qContent[0]) {
|
||||
docContent.appendChild(qContent[0]);
|
||||
}
|
||||
|
||||
elPlate.content = docContent;
|
||||
}
|
||||
})(document);
|
||||
|
|
Loading…
Reference in New Issue
Block a user