Seven Gravity Gateway

Usage no npm install needed!

<script type="module">
  import nsoftSevenGravityGateway from 'https://cdn.skypack.dev/@nsoft/seven-gravity-gateway';


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.

Master gateway:

var Gateway = window.gravity.gateway.master;


import Gateway from '@nsoft/seven-gravity-gateway/master';

Slave gateway:

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.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request