'use strict'; var uuid = require('uuid'); var debounce = require('lodash.debounce'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } var debounce__default = /*#__PURE__*/_interopDefaultLegacy(debounce); // var script = { name: 'VueIframe', props: { src: { type: String, required: true }, crossorigin: { type: String, default: 'anonymous' }, target: { type: String, default: '_parent' }, className: { type: String, required: false }, allow: { type: String, default: 'camera *; geolocation *; microphone *; autoplay *' }, name: { type: String, default: 'vue-iframes' }, frameId: { type: String, default: 'vue-iframes' }, scrolling: String, width: [String, Number], height: [String, Number] }, data () { return { iframeEl: {}, iframeLoadedMessage: `IFRAME_LOADED_${uuid.v4()}`, iframeOnReadyStateChangeMessage: `IFRAME_ON_READ_STATE_CHANGE_${uuid.v4()}` }; }, methods: { removeIframe () { while (this.$el.firstChild) { this.$el.removeChild(this.$el.firstChild); } }, setIframeUrl () { if(!this.iframeEl.contentWindow) { this.initIframe(); } this.$nextTick(() => { const iframeDoc = this.iframeEl.contentWindow.document; iframeDoc.open() .write(`