import { r as registerInstance, c as createEvent, h } from './index-c948674f.js';

const indexCss = "iframe{border:none}.taro-webview{position:fixed;top:0;bottom:0;z-index:999;width:100%;height:100%}";

const WebView = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.onLoad = createEvent(this, "load", 7);
    this.onError = createEvent(this, "error", 7);
    this.src = undefined;
  }
  render() {
    const { src, onLoad, onError } = this;
    return (h("iframe", { class: 'taro-webview', onLoad: (e) => {
        e.stopPropagation();
        onLoad.emit({ src });
      }, onError: (e) => {
        e.stopPropagation();
        onError.emit({ src });
      }, src: src }));
  }
};
WebView.style = indexCss;

export { WebView as taro_web_view_core };

//# sourceMappingURL=taro-web-view-core.entry.js.map