Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@videsk/headway-sdk

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@videsk/headway-sdk

Headway SDK for integrate changelog in custom HTML node.

  • 1.1.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

Headway SDK

Disclaimer

Videsk is not proprietary of Headwayapp.co, and not have any business direct relation with Headway App, Inc. This SDK was developed because Videsk need integrate Headway app in custom UI, more programmatically and flexible.

Headway App, Inc. can decide to make this code public, transfer to them or delete it.

Please take as real needs of a customer, not intent of break copyrights.

Installation

npm i @videsk/headway-sdk

How to use

const account = 'XXXXX';
const changelog = new HeadwaySDK(account);
changelog.on('height', height => {
    // Set height to the iframe or parent node that contain the iframe
});
changelog.on('ready', (changelogs) => {
    // Do something if you want or with changelogs
    // The changelogs is an array
});
const element = document.querySelector('body');
changelog.render(element);

Events

The SDK provide a list of events. Events can be set by property event or method on, after instance the class.

property

changelog.events.ready = function () {
    // Do something
};
changelog.events.badge = function () {
    // Do something
};

method

changelog.on('ready', function () {
    // Do something
});
changelog.on('badge', function () {
    // Do something
});

Ready

Ready event is emitted when the widget (iframe) was loaded successfully. Returns the changelogs as argument.

changelog.on('ready', function (changelogs) {
    // Do something
});

Badge

Badge event is emitted to set the number of changelogs has not been seen. Returns the number of changelog as argument.

changelog.on('badge', function (number) {
    // Set badge on your DOM node
})

Height

Height event is emitted to set the height of iframe or parent node in pixels. This is based on height of website iframe to avoid showing an overflow.

This event can consider as optional to listen, because if you don't listen an overflow will display on iframe.

changelog.on('height', function (height) {
    // Apply height to custom node.
    iframe.style.height = height + 'px'; // Example
    iframeContainer.style.height = height + 'px'; // Example
});

Copyrights

This SDK was develop by Videsk, but the real proprietary is Headway App, Inc., and is mandated to decide to eliminate or unpublished this code.

Keywords

FAQs

Package last updated on 24 May 2021

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc