NPM Package
Median JavaScript Bridge NPM Package
Single-Page Applications (SPAs) are widely used to power native apps built through the Median platform. Our NPM Package library makes it easier to use Median JavaScript Bridge methods from within a SPA web application, and to provide a seamless experience for end-users. The library is framework-agnostic and is designed to work with all major JavaScript frameworks including React, Angular, Vue.js, etc. Follow the steps below to install the package and start using within your web app.
https://www.npmjs.com/package/median-js-bridge
Website Overrides → JavaScript Frameworks and NPM
When using the Median JavaScript Bridge NPM package within your web app you must enable this option in the App Studio to prevent the use of your native app's embedded JavaScript Bridge Library and to provide support for listeners. Note that enabling this option in the App Studio without including the NPM package in your web app will cause regular JavaScript Bridge functions and callbacks to not be available.
Installation
Install using a package manager
Install the package using npm
or yarn
npm install median-js-bridge --save
OR
yarn add median-js-bridge
Install using a script tag
If you prefer to embed the JavaScript Bridge Library via a <script>
tag:
<script type="text/javascript" src="https://unpkg.com/median-js-bridge@latest/dist/median.min.js"></script>
ServiceWorker Support
Advanced features such as ServiceWorkers can also be configured with assistance from the Median team
Updated 6 months ago