material-toggle
Advanced tools
Comparing version 1.0.4 to 1.0.5
@@ -117,3 +117,2 @@ /** | ||
ShadyCSS.prepareTemplate(template, 'material-toggle') // eslint-disable-line no-undef | ||
/** | ||
@@ -128,3 +127,7 @@ * A simple (boolean) material toggle based on a checkbox, which works in a normal html form | ||
let shadowRoot = this.attachShadow({mode: 'open'}) | ||
ShadyCSS.applyStyle(this) // eslint-disable-line no-undef | ||
// check if polyfill is used | ||
if (typeof ShadyCSS !== 'undefined') { | ||
ShadyCSS.prepareTemplate(template, 'material-toggle') // eslint-disable-line no-undef | ||
ShadyCSS.applyStyle(this) // eslint-disable-line no-undef | ||
} | ||
shadowRoot.appendChild(document.importNode(template.content, true)) | ||
@@ -131,0 +134,0 @@ } |
{ | ||
"name": "material-toggle", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Material Design toggle web component. No framework, vanilla js", | ||
@@ -5,0 +5,0 @@ "main": "dist/material-toggle.js", |
@@ -117,3 +117,2 @@ /** | ||
ShadyCSS.prepareTemplate(template, 'material-toggle') // eslint-disable-line no-undef | ||
/** | ||
@@ -128,3 +127,7 @@ * A simple (boolean) material toggle based on a checkbox, which works in a normal html form | ||
let shadowRoot = this.attachShadow({mode: 'open'}) | ||
ShadyCSS.applyStyle(this) // eslint-disable-line no-undef | ||
// check if polyfill is used | ||
if (typeof ShadyCSS !== 'undefined') { | ||
ShadyCSS.prepareTemplate(template, 'material-toggle') // eslint-disable-line no-undef | ||
ShadyCSS.applyStyle(this) // eslint-disable-line no-undef | ||
} | ||
shadowRoot.appendChild(document.importNode(template.content, true)) | ||
@@ -131,0 +134,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
118832
19
1094