postmessage-client

1.0.0 • Public • Published

postmessage-client Build Status

NPM

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);
});

Readme

Keywords

Package Sidebar

Install

npm i postmessage-client

Weekly Downloads

0

Version

1.0.0

License

ISC

Last publish

Collaborators

  • zer0latency