Seven Gravity Gateway
This component serves as communication layer between parent and child frames. Gateway supports cross and same origin communication between frames on same page.
npm install @nsoft/seven-gravity-gateway --save
GG consists of 2 modules: Master and Slave module. Master module is intended for frames which will integrate 3rd party product via iframe. Slave module is intended for applications which will be integrated in some 3rd party frame.
Modules are exposed as UMD modules which we can be required as CommonJS or AMD modules, or simply injecting the script in HTML and using the global reference.
var Gateway = window.gravity.gateway.master;
import Gateway from '@nsoft/seven-gravity-gateway/master';
var Gateway = window.gravity.gateway.slave;
import Gateway from '@nsoft/seven-gravity-gateway/slave';
To load both modules:
import Gateway from '@nsoft/seven-gravity-gateway';
For a detailed explanation about how GG works, check Wiki.
npm run test or
npm run test:watch
Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature)
- Commit your Changes (
git commit -m 'Add some AmazingFeature')
- Push to the Branch (
git push origin feature/AmazingFeature)
- Open a Pull Request