UNPKG

quasar

Version:

Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time

74 lines (67 loc) 1.92 kB
{ "meta": { "docsUrl": "https://v1.quasar.dev/options/platform-detection" }, "injection": "$q.platform", "props": { "userAgent": { "type": "String", "desc": "Client browser User Agent", "examples": [ "mozilla/5.0 (macintosh; intel mac os x 10_14_5) applewebkit/537.36 (khtml, like gecko) chrome/75.0.3770.100 safari/537.36" ] }, "is": { "type": "Object", "desc": "Client browser details (property names depend on browser)", "examples": [ "{ chrome: true, version: '71.0.3578.98', versionNumber: 71, mac: true, desktop: true, webkit: true, name: 'chrome', platform: 'mac' }" ] }, "has": { "type": "Object", "desc": "Client browser detectable properties", "definition": { "touch": { "type": "Boolean", "desc": "Client browser runs on device with touch support" }, "webStorage": { "type": "Boolean", "desc": "Client browser has Web Storage support" } }, "examples": [ "{ touch: false, webStorage: true }" ] }, "within": { "type": "Object", "desc": "Client browser environment", "definition": { "iframe": { "type": "Boolean", "desc": "Does the app run under an iframe?" } }, "examples": [ "{ iframe: false }" ] } }, "methods": { "parseSSR": { "desc": "For SSR usage only, and only on the global import (not on $q.platform)", "params": { "ssrContext": { "type": "Object", "desc": "SSR Context Object", "required": true, "__exemption": [ "examples" ] } }, "returns": { "type": "Object", "tsType": "Platform", "desc": "Platform object (like $q.platform) for SSR usage purposes", "__exemption": [ "examples" ] } } } }