forked from quasarframework/quasar
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlatform.json
More file actions
73 lines (67 loc) · 1.88 KB
/
Platform.json
File metadata and controls
73 lines (67 loc) · 1.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"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" ]
}
}
}
}