tl-iframe-rpc
v1.1.5
Published
``` parent.html
Downloads
7
Readme
使用
parent.html
expose(document.getElementById('iframe').contentWindow, {
getUserInfo: () => ({ id: 123, name: 'name' }),
});
child.html
rpc.addEventListener('test', () => {
console.log('事件回调');
});