@pi0/framework7
Version:
Full featured mobile HTML framework for building iOS & Android apps
25 lines (23 loc) • 486 B
JavaScript
import Support from '../../utils/support';
export default {
name: 'support',
proto: {
support: Support,
},
static: {
support: Support,
},
on: {
init() {
const html = document.querySelector('html');
const classNames = [];
if (Support.positionSticky) {
classNames.push('support-position-sticky');
}
// Add html classes
classNames.forEach((className) => {
html.classList.add(className);
});
},
},
};