During widget initialization, it is currently assumed that the widgets will be found in the current window.document since document.getElementById(...) is used to find the widget elements that were rendered. I have a use case for rendering widgets into another frame. Something like:
var iframeEl = document.getElementById('some-iframe');
MyWidget.render({message: 'Hello'}).appendTo(iframeEl.contentWindow.document.body);
I have a fix that seems to be working properly and backwards compatible. I'll create pull request after a little more testing.
During widget initialization, it is currently assumed that the widgets will be found in the current
window.document
sincedocument.getElementById(...)
is used to find the widget elements that were rendered. I have a use case for rendering widgets into another frame. Something like:I have a fix that seems to be working properly and backwards compatible. I'll create pull request after a little more testing.