@tarojs/components
Version:
30 lines (24 loc) • 847 B
JavaScript
Object.defineProperty(exports, '__esModule', { value: true });
const index = require('./index-972104de.js');
const indexCss = "iframe{border:none}.taro-webview{z-index:999;width:100%;height:100%;position:fixed;top:0;bottom:0}";
const WebView = class {
constructor(hostRef) {
index.registerInstance(this, hostRef);
this.onLoad = index.createEvent(this, "load", 7);
this.onError = index.createEvent(this, "error", 7);
this.src = undefined;
}
render() {
const { src, onLoad, onError } = this;
return (index.h("iframe", { class: 'taro-webview', onLoad: (e) => {
e.stopPropagation();
onLoad.emit({ src });
}, onError: (e) => {
e.stopPropagation();
onError.emit({ src });
}, src: src }));
}
};
WebView.style = indexCss;
exports.taro_web_view_core = WebView;
;