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