How to use the onsenui/core-src/ons/ons.platform function in onsenui

To help you get started, we’ve selected a few onsenui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github btpka3 / btpka3.github.com / js / angular / my-ng4 / srcBak / app / ons-ex / setup.js View on Github external
ons.platform._runOnActualPlatform(() => {
    if (ons.platform.isAndroid()) {
      // In Android4.4+, correct viewport settings can remove click delay.
      // So disable FastClick on Android.
      ons.fastClick.destroy();
    } else if (ons.platform.isIOS()) {
      if (supportTouchAction && (ons.platform.isIOSSafari() || ons.platform.isWKWebView())) {
        // If 'touch-action' supported in iOS Safari or WKWebView, disable FastClick.
        ons.fastClick.destroy();
      } else {
        // Do nothing. 'touch-action: manipulation' has no effect on UIWebView.
      }
    }
  });
}, false);
github btpka3 / btpka3.github.com / js / angular / my-ng4 / srcBak / app / ons-ex / setup.js View on Github external
window.addEventListener('load', () => {
  ons.fastClick = FastClick.attach(document.body);

  const supportTouchAction = 'touch-action' in document.body.style;

  ons.platform._runOnActualPlatform(() => {
    if (ons.platform.isAndroid()) {
      // In Android4.4+, correct viewport settings can remove click delay.
      // So disable FastClick on Android.
      ons.fastClick.destroy();
    } else if (ons.platform.isIOS()) {
      if (supportTouchAction && (ons.platform.isIOSSafari() || ons.platform.isWKWebView())) {
        // If 'touch-action' supported in iOS Safari or WKWebView, disable FastClick.
        ons.fastClick.destroy();
      } else {
        // Do nothing. 'touch-action: manipulation' has no effect on UIWebView.
      }
    }
  });
}, false);