iframe-console
v0.1.14
Published
Get console and error information from an iframe
Downloads
6
Readme
iframe-console
Gather iframe errors and console messages
Installation
npm install iframe-console
Usage
In iframe:
require('iframe-console')()
In parent:
window.addEventListener('message', function ({type, data}) {
// handle message
})
API
iframeConsole(source, target)
source
- type: string
- url source of message [defaults to window.parent.document.URL]
target
- type: window
- the window to direct console messages to