-
Notifications
You must be signed in to change notification settings - Fork 0
fix(FF): it works #14
Conversation
"rollup-plugin-postcss": "^3.1.8", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.29.0", | ||
"ts-jest": "^26.4.4", | ||
"typescript": "^4.0.5" | ||
}, | ||
"dependencies": { | ||
"@webcomponents/webcomponentsjs": "2.5.0" | ||
"@webcomponents/webcomponentsjs": "2.2.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FF 54 doesn't work with webcomponents polyfill > 2.2
@@ -172,6 +173,9 @@ const ROLLUP = [ | |||
moduleDirectory: 'submodules/math-json/src', | |||
}, | |||
}), | |||
polyfill([ | |||
'@webcomponents/webcomponentsjs/webcomponents-bundle.js', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inject polyfill via rollup
polyfill injected in code doesn't work with multi-instance
src/public/mathfield-element.ts
Outdated
constructor(options?: Partial<MathfieldOptions>) { | ||
super(); | ||
|
||
if ((window as any).ShadyCSS) { | ||
(window as any).ShadyCSS.prepareTemplate(MATHFIELD_TEMPLATE, 'host'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shadowCSS old browser support
@@ -383,18 +388,18 @@ export class MathfieldElement extends HTMLElement implements Mathfield { | |||
); | |||
|
|||
// Inline options (as a JSON structure in the markup) | |||
try { | |||
const json = slot | |||
.assignedElements() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no polyfill found/work
|
||
this.#mathfield = new MathfieldPrivate( | ||
this.shadowRoot.querySelector(':host > div'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
":host" selector doesn't work on older browser
use rollup to inject polyfill (FF < 63 support + IE 11)
remove sound (chronoquiz crash)