1 | import { r as registerInstance, c as createEvent, h } from './index-8809c729.js';
|
2 |
|
3 | const indexCss = "iframe{border:none}.taro-webview{position:fixed;top:0;bottom:0;z-index:999;width:100%;height:100%}";
|
4 |
|
5 | let WebView = class {
|
6 | constructor(hostRef) {
|
7 | registerInstance(this, hostRef);
|
8 | this.onLoad = createEvent(this, "load", 7);
|
9 | this.onError = createEvent(this, "error", 7);
|
10 | }
|
11 | render() {
|
12 | const { src, onLoad, onError } = this;
|
13 | return (h("iframe", { class: 'taro-webview', onLoad: (e) => {
|
14 | e.stopPropagation();
|
15 | onLoad.emit({ src });
|
16 | }, onError: (e) => {
|
17 | e.stopPropagation();
|
18 | onError.emit({ src });
|
19 | }, src: src }));
|
20 | }
|
21 | };
|
22 | WebView.style = indexCss;
|
23 |
|
24 | export { WebView as taro_web_view_core };
|