Support

Framework7 also comes with features detection library.

It is avaialable as a support property of Framework7 class (Framework7.support) and same property on initialized app instance (app.support):

// If we need it in place where we don't have access to app instance or before we init the app
if (!Framework7.support.touch) {
  console.log('No touch support');
}


// After we init the app we can access it as app instance property
var app = new Framework7({ /*...*/ });
if (!app.support.touch) {
  console.log('No touch support');
}

Support Properties

touchTouch events support (touchstart, touchmove, touchend)
transforms3dCSS 3D Transforms support
flexboxCSS Flexbox model support
observerMutation Observers support
passiveListenerPassive event listener support
gesturesGestures event support (gesturestart, gesturechange, gestureend)