The transport used on the page where the iframe is embedded. Inherits the EventEmitter interface.
iframe
import {Provider} from 'magic-transport'const id = 'UNIQ_ID'const childOrigin = '*'const sharedObject = { hello: { from: { provider() { return 'hello from provider' } } }}const transport = new Provider({id, childOrigin, ...sharedObject})transport.once('ready', () => { // Transport is ready for use}) Copy
import {Provider} from 'magic-transport'const id = 'UNIQ_ID'const childOrigin = '*'const sharedObject = { hello: { from: { provider() { return 'hello from provider' } } }}const transport = new Provider({id, childOrigin, ...sharedObject})transport.once('ready', () => { // Transport is ready for use})
The provider facade.
The consumer facade.
Creates a new Provider instance.
Provider
Generated using TypeDoc
The transport used on the page where the
iframe
is embedded. Inherits the EventEmitter interface.