- Injecting nodes one after another and waiting for script tags that have a
srcattribute to be loaded.
- Using
appendinstead ofappendChildwhen injecting HTML.
- Generated iframe HTML will now add all attributes to cloned script nodes.
- Generated iframe HTML will now append one child after the other with separate calls.
- Added optional HTML generation options
extendHeadandextendBodywhich allows you to statically inject custom HTML into the head and body.
- Checking if running inside iframe based on
window.parentand notwindow.top.
dist/mjsis now post-processed with librarytsc-esm-fixto add.jssuffix to all imports.
- Updated/corrected README.
- Updated/corrected README.
- receive methods now check for
event.source === iframe.contentWindowif an iframe is passed. - receive methods have a new
optionsparameter that allows to change the behaviour (iframeEmitterCheck) to additionally check ifevent.originmatchesiframe.src.
- send methods were accessing iframe window's location although host window location shall be accessed.
- send* and receive* methods do not accept a window object anymore
- send* and receive* methods auto resolve the targetOrigin now via
iframe.getAttribute("src")
Initial release:
- Server functions to generate helper page/iframe HTML.
- Client functions to set head + body content, and to receive dimension updates.