officert / vue-friendly-iframe

A Vue js component for creating super fast loading, non-blocking iframes.
https://officert.github.io/vue-friendly-iframe/
307 stars 57 forks source link

Using with Golden Layout #21

Open klongmitre opened 4 years ago

klongmitre commented 4 years ago

I'm trying to use this component with Golden-Layout, but was running into an error where contentWindow was not yet set when the vue-friendly-iframe component was mounted.

In setIframeUrl function, I was able to add...

if (this.iframeEl.contentWindow === null) {
        setTimeout(this.setIframeUrl, 10)
        return
}

...which seems to get it to load, but this seems like a hack (or maybe it's not). Any thoughts on how to do this more gracefully?

klongmitre commented 4 years ago

I initiated a pull request with the code that addresses this issue: https://github.com/officert/vue-friendly-iframe/pull/22