moved template polyfill

This commit is contained in:
Heydon Pickering 2017-08-25 09:04:54 +01:00
parent ed3ef9e384
commit 14696ac278
34 changed files with 691 additions and 58 deletions

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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);

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }
@ -523,7 +546,6 @@ toggle.addEventListener('click', (e) => {
var launchButton = document.querySelector('[data-launch="js-demo-414e06a48e755bf9e43e5e2596f9ea7a"]'); var launchButton = document.querySelector('[data-launch="js-demo-414e06a48e755bf9e43e5e2596f9ea7a"]');
launchButton.addEventListener('click', function () { launchButton.addEventListener('click', function () {
var demoContent = template.content;
var standalone = window.open(); var standalone = window.open();
script.textContent = standaloneScript; script.textContent = standaloneScript;
standalone.document.body.appendChild(template.content.cloneNode(true)); standalone.document.body.appendChild(template.content.cloneNode(true));

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }
@ -1897,7 +1920,6 @@ toggle.addEventListener('click', (e) => {
var launchButton = document.querySelector('[data-launch="js-demo-414e06a48e755bf9e43e5e2596f9ea7a"]'); var launchButton = document.querySelector('[data-launch="js-demo-414e06a48e755bf9e43e5e2596f9ea7a"]');
launchButton.addEventListener('click', function () { launchButton.addEventListener('click', function () {
var demoContent = template.content;
var standalone = window.open(); var standalone = window.open();
script.textContent = standaloneScript; script.textContent = standaloneScript;
standalone.document.body.appendChild(template.content.cloneNode(true)); standalone.document.body.appendChild(template.content.cloneNode(true));

File diff suppressed because one or more lines are too long

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="https://thepaciellogroup.github.io/infusion/css/prism.css">
<link rel="stylesheet" type="text/css" href="https://thepaciellogroup.github.io/infusion/css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -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 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" href="{{ "css/prism.css" | absURL }}">
<link rel="stylesheet" type="text/css" href="{{ "css/styles.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"> <style id="inverter" media="none">
html { filter: invert(100%) } html { filter: invert(100%) }
* { background-color: inherit } * { background-color: inherit }

View File

@ -37,7 +37,6 @@
var launchButton = document.querySelector('[data-launch="js-demo-{{ $uniq }}"]'); var launchButton = document.querySelector('[data-launch="js-demo-{{ $uniq }}"]');
launchButton.addEventListener('click', function () { launchButton.addEventListener('click', function () {
var demoContent = template.content;
var standalone = window.open(); var standalone = window.open();
script.textContent = standaloneScript; script.textContent = standaloneScript;
standalone.document.body.appendChild(template.content.cloneNode(true)); standalone.document.body.appendChild(template.content.cloneNode(true));

View File

@ -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);