Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

fix(FF): it works #14

Merged
merged 8 commits into from
Dec 9, 2020
Merged

fix(FF): it works #14

merged 8 commits into from
Dec 9, 2020

Conversation

mderrier
Copy link

@mderrier mderrier commented Dec 8, 2020

use rollup to inject polyfill (FF < 63 support + IE 11)
remove sound (chronoquiz crash)

"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"
Copy link
Author

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',
Copy link
Author

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

constructor(options?: Partial<MathfieldOptions>) {
super();

if ((window as any).ShadyCSS) {
(window as any).ShadyCSS.prepareTemplate(MATHFIELD_TEMPLATE, 'host');
Copy link
Author

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()
Copy link
Author

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'),
Copy link
Author

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

@mderrier mderrier merged commit 62d39fe into master Dec 9, 2020
@mderrier mderrier deleted the wip branch February 23, 2023 14:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants