postmessage-client
1.0.0 • Public • Published postmessage-client
Installation
npm install --save postmessage-client
Usage
You must use this module with postmessage-server module on the other side (remote window)
es6
import Client from '../src';
const client = new Client();
client.connect(window, window.opener);
client.get('test/route', {id: '1'}).then(data => {
console.log(data);
});
es5
var PMClient = require('postmessage-client');
var client = new PMClient();
client.connect(window.opener);
client.get('test/route').then(function (data) {
console.log(data);
});
Package Sidebar
Install
Weekly Downloads