fix(react): using autonomous web component for safari support, closes #21803

* fix(react): using autonomous web component for safari support, closes #21803

* taking out extends
This commit is contained in:
Ely Lucas
2020-07-24 12:25:28 -06:00
committed by GitHub
parent 3c9d6ea5f5
commit bfddb17065
2 changed files with 6 additions and 3 deletions

View File

@@ -8,7 +8,7 @@
"@capacitor/core": "1.5.2",
"@capacitor/ios": "^2.2.0",
"@ionic/core": "^5.3.0-dev.202006121329.e968bd0",
"@ionic/react": "file:../../react/ionic-react-5.2.2.tgz",
"@ionic/react": "file:../../react/ionic-react-5.3.0.tgz",
"@svgr/webpack": "4.3.3",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.4.0",

View File

@@ -8,14 +8,17 @@ import { IonRouterOutlet } from '../IonRouterOutlet';
import { IonTabBar } from './IonTabBar';
import { IonTabsContext, IonTabsContextState } from './IonTabsContext';
class IonTabsElement extends HTMLDivElement {
class IonTabsElement extends HTMLElement {
constructor() {
super();
}
}
if (window && window.customElements) {
customElements.define('ion-tabs', IonTabsElement, { extends: 'div' });
const element = customElements.get('ion-tabs');
if (!element) {
customElements.define('ion-tabs', IonTabsElement);
}
}
declare global {