@haxtheweb/d-d-d
Advanced tools
Comparing version 9.0.0 to 9.0.1
43
d-d-d.js
@@ -114,4 +114,11 @@ /** | ||
super(); | ||
this.isSafari = globalThis.safari !== undefined; | ||
globalThis.DDDSharedStyles.requestAvailability(); | ||
} | ||
static get properties() { | ||
return { | ||
...super.properties, | ||
isSafari: { type: Boolean, reflect: true, attribute: "is-safari" }, | ||
}; | ||
} | ||
/** | ||
@@ -156,15 +163,25 @@ * LitElement style callback | ||
).join(""); | ||
const adoptableDDD = new CSSStyleSheet(); | ||
adoptableDDD.replaceSync(globalStyles); | ||
// THIS FLAG MAKES HAX LOAD IT IN ITS SHADOW ROOT!!!! | ||
adoptableDDD.hax = true; | ||
// Combine the existing adopted sheets if we need to but these will work everywhere | ||
// and are very fast | ||
globalThis.document.adoptedStyleSheets = [ | ||
...globalThis.document.adoptedStyleSheets, | ||
adoptableDDD, | ||
]; | ||
loadDDDFonts(); | ||
globalThis.document.onload = dddCSSFeatureDetection(); | ||
globalThis.DDDSharedStyles.instance = adoptableDDD; | ||
try { | ||
const adoptableDDD = new CSSStyleSheet(); | ||
adoptableDDD.replaceSync(globalStyles); | ||
// THIS FLAG MAKES HAX LOAD IT IN ITS SHADOW ROOT!!!! | ||
adoptableDDD.hax = true; | ||
// Combine the existing adopted sheets if we need to but these will work everywhere | ||
// and are very fast | ||
globalThis.document.adoptedStyleSheets = [ | ||
...globalThis.document.adoptedStyleSheets, | ||
adoptableDDD, | ||
]; | ||
loadDDDFonts(); | ||
globalThis.document.onload = dddCSSFeatureDetection(); | ||
globalThis.DDDSharedStyles.instance = adoptableDDD; | ||
} | ||
catch(e) { | ||
const oldStyleSafariBs = document.createElement('style'); | ||
oldStyleSafariBs.innerHTML = globalStyles; | ||
globalThis.document.head.appendChild(oldStyleSafariBs); | ||
loadDDDFonts(); | ||
globalThis.document.onload = dddCSSFeatureDetection(); | ||
globalThis.DDDSharedStyles.instance = oldStyleSafariBs; | ||
} | ||
} | ||
@@ -171,0 +188,0 @@ return globalThis.DDDSharedStyles.instance; |
@@ -23,3 +23,3 @@ { | ||
}, | ||
"version": "9.0.0", | ||
"version": "9.0.1", | ||
"description": "design, develop, destroy the competition", | ||
@@ -48,9 +48,9 @@ "repository": { | ||
"dependencies": { | ||
"@haxtheweb/hax-iconset": "^9.0.0", | ||
"@haxtheweb/simple-colors": "^9.0.0", | ||
"@haxtheweb/simple-icon": "^9.0.0", | ||
"@haxtheweb/hax-iconset": "^9.0.1", | ||
"@haxtheweb/simple-colors": "^9.0.1", | ||
"@haxtheweb/simple-icon": "^9.0.1", | ||
"lit": "^3.1.4" | ||
}, | ||
"devDependencies": { | ||
"@haxtheweb/deduping-fix": "^9.0.0", | ||
"@haxtheweb/deduping-fix": "^9.0.1", | ||
"@open-wc/testing": "4.0.0", | ||
@@ -76,3 +76,3 @@ "@polymer/iron-component-page": "github:PolymerElements/iron-component-page", | ||
], | ||
"gitHead": "77b3fbce0cfab6f70716e875d24b77c5f9c01d99" | ||
"gitHead": "7f62cde6a6242afcb57715e1e2067ea767c777fd" | ||
} |
@@ -114,4 +114,11 @@ /** | ||
super(); | ||
this.isSafari = globalThis.safari !== undefined; | ||
globalThis.DDDSharedStyles.requestAvailability(); | ||
} | ||
static get properties() { | ||
return { | ||
...super.properties, | ||
isSafari: { type: Boolean, reflect: true, attribute: "is-safari" }, | ||
}; | ||
} | ||
/** | ||
@@ -156,15 +163,25 @@ * LitElement style callback | ||
).join(""); | ||
const adoptableDDD = new CSSStyleSheet(); | ||
adoptableDDD.replaceSync(globalStyles); | ||
// THIS FLAG MAKES HAX LOAD IT IN ITS SHADOW ROOT!!!! | ||
adoptableDDD.hax = true; | ||
// Combine the existing adopted sheets if we need to but these will work everywhere | ||
// and are very fast | ||
globalThis.document.adoptedStyleSheets = [ | ||
...globalThis.document.adoptedStyleSheets, | ||
adoptableDDD, | ||
]; | ||
loadDDDFonts(); | ||
globalThis.document.onload = dddCSSFeatureDetection(); | ||
globalThis.DDDSharedStyles.instance = adoptableDDD; | ||
try { | ||
const adoptableDDD = new CSSStyleSheet(); | ||
adoptableDDD.replaceSync(globalStyles); | ||
// THIS FLAG MAKES HAX LOAD IT IN ITS SHADOW ROOT!!!! | ||
adoptableDDD.hax = true; | ||
// Combine the existing adopted sheets if we need to but these will work everywhere | ||
// and are very fast | ||
globalThis.document.adoptedStyleSheets = [ | ||
...globalThis.document.adoptedStyleSheets, | ||
adoptableDDD, | ||
]; | ||
loadDDDFonts(); | ||
globalThis.document.onload = dddCSSFeatureDetection(); | ||
globalThis.DDDSharedStyles.instance = adoptableDDD; | ||
} | ||
catch(e) { | ||
const oldStyleSafariBs = document.createElement('style'); | ||
oldStyleSafariBs.innerHTML = globalStyles; | ||
globalThis.document.head.appendChild(oldStyleSafariBs); | ||
loadDDDFonts(); | ||
globalThis.document.onload = dddCSSFeatureDetection(); | ||
globalThis.DDDSharedStyles.instance = oldStyleSafariBs; | ||
} | ||
} | ||
@@ -171,0 +188,0 @@ return globalThis.DDDSharedStyles.instance; |
Sorry, the diff of this file is too big to display
246998
7759