Prevent iOS Dismiss Event On Web App – prevent-bounce

Category: Javascript | June 4, 2018
Authorhg-pyun
Last UpdateJune 4, 2018
LicenseMIT
Tags
Views56 views
Prevent iOS Dismiss Event On Web App – prevent-bounce

prevent-bounce is a small JavaScript library used to prevent iOS 11+ dismiss event for web applications.

How to use it:

Install the prevent-bounce with NPM:

# NPM
$ npm install prevent-bounce --save

Import the prevent-bounce module.

import PreventBounce from 'prevent-bounce';

Attach the prevent event to a specific element or the whole document.

var preventBounce = new PreventBounce();
preventBounce.attach();

Remove the prevent event.

var preventBounce = new PreventBounce();
preventBounce.remove();

You Might Be Interested In:


Leave a Reply