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 changelog = new HeadwaySDK();
changelog.on('height', height => {
});
changelog.on('ready', (changelogs) => {
});
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 () {
};
changelog.events.badge = function () {
};
method
changelog.on('ready', function () {
});
changelog.on('badge', function () {
});
Ready
Ready event is emitted when the widget (iframe) was loaded successfully. Returns the changelogs as argument.
changelog.on('ready', function (changelogs) {
});
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) {
})
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) {
iframe.style.height = height + 'px';
iframeContainer.style.height = height + 'px';
});
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.