Socket
Socket
Sign inDemoInstall

@nsoft/seven-gravity-gateway

Package Overview
Dependencies
0
Maintainers
7
Versions
63
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @nsoft/seven-gravity-gateway

Seven Gravity Gateway


Version published
Weekly downloads
26
decreased by-45.83%
Maintainers
7
Install size
429 kB
Created
Weekly downloads
 

Readme

Source

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

npm install @nsoft/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 '@nsoft/seven-gravity-gateway/master';

Slave gateway:

var Gateway = window.gravity.gateway.slave;

or

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.

Test

npm run test or npm run test:watch

Contributing

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

Keywords

FAQs

Last updated on 30 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc