1.1.3 • Published 7 months ago

iframe-helper v1.1.3

Weekly downloads
-
License
MIT
Repository
-
Last release
7 months ago

iframe communication helper

host

// Host
import { Host as IframeHost } from 'iframe-helper';

const host = new IframeHost(iframeElement, iframeUrl);
host.addHandler('methodName', async (methodData) => {
  return 'xxx';
});

// call this before load iframe
host.init();

iframe

import { Subpage } from 'iframe-helper';

const helper = new Subpage();
helper.ready.then(() => helper.call('methodName', methodData))
  .then((result) => console.log('result', result))
	.catch(e => console.error(e))
1.1.1

8 months ago

1.1.0

8 months ago

1.1.3

7 months ago

1.1.2

8 months ago

0.1.0

8 months ago

1.0.9

1 year ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.1

2 years ago