changelog-core

```bash # npm npm install changelog-core

Usage no npm install needed!

<script type="module">
  import changelogCore from 'https://cdn.skypack.dev/changelog-core';
</script>

README

Changes Core SDK

The core SDK serves as a reusable platform for embedding a Changes changelog into any website.
The core SDK is used by the Sidebar SDK and the Widget SDK.

Installation

# npm
npm install changelog-core

# yarn
yarn add changelog-core

Usage

import CoreSDK from 'changelog-core';

// Instantiate the CoreSDK
let sdk = new CoreSDK({
  id: '5Web2XRF',
  key: 'IK-X2zvTYjp-NCg-3q2Rj'
});

// Delete the CoreSDK iframe
sdk.remove();

// Refresh the CoreSDK iframe
sdk.update();

// Access the iframe
sdk.iframe;

sdk.on('init', ...);
sdk.on('remove', ...);
sdk.on('update', ...);
sdk.on('loaded', ...);

API

new CoreSDK(options)

Create a new instance of a changelog-embed.

options

Type:

{
  id: string;
  mode?: string;
  options?: {
    embedHost?: string;
  }
}

sdk.remove()

Destruct a changelog-iframe.

sdk.remove()

Update the changelog-embed-iframe's contents.

sdk.on(event: string, cb: () => any)

Listen to internal events.

sdk.iframe: HTMLIframeElement

Access the changelog-embed-iframe.