feat(custom-elements): add experimental custom elements build (#22863)

Co-authored-by: Liam DeBeasi <liamdebeasi@icloud.com>
This commit is contained in:
Adam Bradley
2021-02-11 11:08:00 -06:00
committed by GitHub
parent 19d63f6243
commit 0de75afbef
61 changed files with 5430 additions and 7613 deletions

View File

@ -1,6 +1,7 @@
import { Component, ComponentInterface, Element, Event, EventEmitter, Host, Method, Prop, Watch, h } from '@stencil/core';
import { getIonMode } from '../../global/ionic-global';
import { componentOnReady } from '../../utils/helpers'
import { SwiperInterface, SwiperOptions } from './swiper/swiper-interface';
@ -146,12 +147,12 @@ export class Slides implements ComponentInterface {
subtree: true
});
this.el.componentOnReady().then(() => {
componentOnReady(this.el, () => {
if (!this.didInit) {
this.didInit = true;
this.initSwiper();
}
});
})
}
}
@ -530,6 +531,6 @@ export class Slides implements ComponentInterface {
const waitForSlides = (el: HTMLElement) => {
return Promise.all(
Array.from(el.querySelectorAll('ion-slide')).map(s => s.componentOnReady())
Array.from(el.querySelectorAll('ion-slide')).map(s => new Promise(resolve => componentOnReady(s, resolve)))
);
};