1.13.2 • Published 9 months ago

@emartech/me-sdk-bridge v1.13.2

Weekly downloads
35
License
MIT
Repository
github
Last release
9 months 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.13.2

9 months ago

1.13.1

9 months ago

1.13.0

11 months ago

1.12.0

11 months ago

1.9.0

2 years ago

1.8.0

3 years ago

1.11.0

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.7.0

4 years ago

1.6.2

4 years ago

1.6.1

5 years ago

1.6.0

5 years ago

1.5.2

8 years ago

1.5.1

8 years ago

1.5.0

8 years ago

1.4.0

8 years ago

1.3.2

8 years ago

1.3.1

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago