Skip to content

seven-gravity-gateway 3.0.3

Install from the command line:
Learn more about npm packages
$ npm install @nsftx/seven-gravity-gateway@3.0.3
Install via package.json:
"@nsftx/seven-gravity-gateway": "3.0.3"

About this version

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.

Installation

Our packages are published to GitHub Packages. You need to add the entry to global or project based .npmrc file so that all requests to install our packages will go through GitHub Packages.

@nsftx:registry=https://npm.pkg.github.com

After that, install package

npm install @nsftx/seven-gravity-gateway --save

Usage

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;

or

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

Slave gateway:

var Gateway = window.gravity.gateway.slave;

or

import Gateway from '@nsftx/seven-gravity-gateway/slave';

To load both modules:

import Gateway from '@nsftx/seven-gravity-gateway';

For a detailed explanation about how GG works, check Wiki.

Test

npm run test or npm run test:watch

Contributing

Any contributions you make are greatly appreciated.

  1. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  2. Commit your Changes (git commit -m 'Add some AmazingFeature')
  3. Push to the Branch (git push origin feature/AmazingFeature)
  4. Open a Pull Request against next
  5. Once approved, Open a new Pull Request against master

Release procedure

In order to release next version of the library pull request is required. Use following steps for release.

Details


Assets

  • seven-gravity-gateway-3.0.3.tgz

Download activity

  • Total downloads 3,724
  • Last 30 days 371
  • Last week 15
  • Today 0