w3c / webextensions

Charter and administrivia for the WebExtensions Community Group (WECG)
Other
580 stars 50 forks source link

Inconsistency: It must be available for iOS #189

Open stefanvd opened 2 years ago

stefanvd commented 2 years ago

Currently, the documentation provides no support for mobile iOS. However, Safari extension is support on iOS and iPadOS Values of this type are strings. Possible values are: "mac", "win", "android", "cros", "linux", "openbsd"

var test = chrome.runtime.PlatformOs;
console.log(JSON.stringify(test));
// Current output
{"ANDROID":"android","CROS":"cros","LINUX":"linux","MAC":"mac","OPENBSD":"openbsd","WIN":"win"}

Resources:

dotproto commented 2 years ago

I'm not sure it makes sense for the Chrome documentation to add this as Chrome extensions are not available on iOS/iPadOS and therefore these would would not be valid options in Chrome. That said, adding this to MDN and nothing that this value is only exposed in Safari makes sense to me.

@xeenon, what values does Safari support on runtime.PlatformOs?

Rob--W commented 2 years ago

Firefox cannot run on iOS. But it can neither run on Chrome OS, which is part of the API definition since the definition was inherited from Chrome at first.

MDN is a documentation source for the whole (web and extension) platform, so if Safari has a meaningful value for PlatformOS that is not documented, then a PR on the BCD repo (https://github.com/mdn/browser-compat-data) would be welcome: https://github.com/mdn/browser-compat-data/blob/cde154721a46fb9611e61d249f5ae2164d1891f2/webextensions/api/runtime.json#L289-L316, along with a PR for documentation at https://github.com/mdn/content/blob/64d9c89c27a9813b60e07595f3c932af3a684ed3/files/en-us/mozilla/add-ons/webextensions/api/runtime/platformos/index.md?plain=1