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

@emartech/me-sdk-bridge

Package Overview
Dependencies
Maintainers
168
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@emartech/me-sdk-bridge

Copyright EMARSYS 2022 All rights reserved.

  • 1.9.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
33
Maintainers
168
Weekly downloads
 
Created
Source

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.

FAQs

Package last updated on 17 Jan 2023

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