1.11.0 • Published 1 year ago

@emartech/me-sdk-bridge v1.11.0

Weekly downloads
35
License
UNLICENSED
Repository
github
Last release
1 year ago

me-sdk-bridge-js npm version

This script provides a JS interface that can be injected into an In App Message's html to make communication with the Mobile Engage SDK easier. The following methods are available on the global MEIAM object.

How to integrate

Include the uglified version (index.min.js) in the html.

Methods provided by the bridge

MEIAM.buttonClicked(<buttonId>, <callback>)

MEIAM.close(<callback>)

MEIAM.makeNetworkRequest(<url>, <method>, <headers>, <payload>, <callback>)

MEIAM.openExternalLink(<url>, <callback>)

MEIAM.requestPushPermission(<callback>)

MEIAM.triggerAppEvent(<name>, <payload>, <callback>)

MEIAM.triggerMEEvent(<name>, <payload>, <callback>)

MEIAM.gotoStep(<name>, <callback>)

Custom Attributes provided by the bridge

me-button-clicked="<buttonId>"

Reports button click with given id.

me-close=""

Closes the in-app message. Note that no click event is reported.

me-make-network-request='{"url": "<url>", "method": "<method>", "headers": <headers>, "payload": <payload>}'

href="<url>"

me-request-push-permission=""

me-trigger-app-event='{"type": "<name>", "payload": <payload>}'

me-trigger-event='{"type": "<name>", "payload": <payload>}'

me-goto-step="<name>"

me-copy-to-clipboard="<value>"

Copies the value to the clipboard when clicked.

Development

npm install

Running the tests

npm run test:lint
npm run test:unit
npm run test:e2e

Release new version

A new version is automatically published when merged into master. It's using the Semenatic Release package to create the new version.

1.9.0

1 year ago

1.8.0

1 year ago

1.11.0

1 year ago

1.10.1

1 year ago

1.10.0

1 year ago

1.7.0

3 years ago

1.6.2

3 years ago

1.6.1

4 years ago

1.6.0

4 years ago

1.5.2

6 years ago

1.5.1

6 years ago

1.5.0

6 years ago

1.4.0

6 years ago

1.3.2

6 years ago

1.3.1

6 years ago

1.3.0

6 years ago

1.2.0

6 years ago

1.1.0

6 years ago

1.0.0

7 years ago