Bug 1315558 documentation for the publicSuffix API - #44401
Conversation
|
|
||
| ```js | ||
| console.log( | ||
| browser.publicSuffix.getDomain("192.0.2.1", { allowIPAddress: true }), |
There was a problem hiding this comment.
Trailing comma in the function parameters are syntactically allowed in JS, but I think that they may cause confusion. Let's drop them from all examples here.
There was a problem hiding this comment.
I still see trailing commas in the diff.
There was a problem hiding this comment.
So you do, but hopefully not now.
There was a problem hiding this comment.
I think the local linting is adding the back - trying again.
|
This pull request has merge conflicts that must be resolved before it can be merged. |
Co-authored-by: Rob Wu <rob@robwu.nl> Co-authored-by: rebloor <git@sherpa.co.nz>
Removed explicit mention of error message content Tidied up glossary references
|
|
||
| ```js | ||
| console.log( | ||
| browser.publicSuffix.getDomain("192.0.2.1", { allowIPAddress: true }) |
There was a problem hiding this comment.
[mdn-linter] reported by reviewdog 🐶
| browser.publicSuffix.getDomain("192.0.2.1", { allowIPAddress: true }) | |
| browser.publicSuffix.getDomain("192.0.2.1", { allowIPAddress: true }), |
| browser.publicSuffix.getDomain("192.0.2.1", { allowIPAddress: true }) | ||
| ); // "192.0.2.1" | ||
| console.log( | ||
| browser.publicSuffix.getDomain("[2001:db8::1]", { allowIPAddress: true }) |
There was a problem hiding this comment.
[mdn-linter] reported by reviewdog 🐶
| browser.publicSuffix.getDomain("[2001:db8::1]", { allowIPAddress: true }) | |
| browser.publicSuffix.getDomain("[2001:db8::1]", { allowIPAddress: true }), |
|
|
||
| ```js | ||
| console.log( | ||
| browser.publicSuffix.getDomain("co.uk", { allowPlainSuffix: true }) |
There was a problem hiding this comment.
[mdn-linter] reported by reviewdog 🐶
| browser.publicSuffix.getDomain("co.uk", { allowPlainSuffix: true }) | |
| browser.publicSuffix.getDomain("co.uk", { allowPlainSuffix: true }), |
| allowUnknownSuffix: true | ||
| }) |
There was a problem hiding this comment.
[mdn-linter] reported by reviewdog 🐶
| allowUnknownSuffix: true | |
| }) | |
| allowUnknownSuffix: true, | |
| }), |
| }) | ||
| ); // "mydevice.local" | ||
| console.log( | ||
| browser.publicSuffix.getDomain("host.intranet", { allowUnknownSuffix: true }) |
There was a problem hiding this comment.
[mdn-linter] reported by reviewdog 🐶
| browser.publicSuffix.getDomain("host.intranet", { allowUnknownSuffix: true }) | |
| browser.publicSuffix.getDomain("host.intranet", { allowUnknownSuffix: true }), |
| encoding: "display" | ||
| }) |
There was a problem hiding this comment.
[mdn-linter] reported by reviewdog 🐶
| encoding: "display" | |
| }) | |
| encoding: "display", | |
| }), |
| encoding: "display" | ||
| }) |
There was a problem hiding this comment.
[mdn-linter] reported by reviewdog 🐶
| encoding: "display" | |
| }) | |
| encoding: "display", | |
| }), |
Rob--W
left a comment
There was a problem hiding this comment.
Could we somehow suppress the linter, so that autofix will not reapply the commas?
|
This pull request has merge conflicts that must be resolved before it can be merged. |
@Rob--W A failing linter doesn't block merging, so this is merged without the commas. |
Wouldn't the commas return if someone were to update the article in the future? As you noticed, the linting issue was autofixed. Unless an exception is added somehow, the commas will return eventually. |
|
FYI to fix it is is probably helpful to know where it is coming from. mdn/content relies on prettier to format the code, and does not set any rules other than: https://github.com/mdn/content/blob/bfaf90116752cffcff6098be4d40f843b8e9f6ee/.prettierrc.json Notably, the To fix it, you could put or if that does not capture the desired part (I think it should!), These comments are documented at https://prettier.io/docs/ignore/ |
Description
Addresses the dev-docs needed requirements of Bug 1315558 "tld service for webextensions", including:
publicSuffixAPI namespace page, describing the API, its permission requirement ("publicSuffix", silently granted), and its availability limited to background scripts.publicSuffix.DomainEncodingtype pagepublicSuffix.isKnownSuffix(),publicSuffix.getKnownSuffix()andpublicSuffix.getDomain()method pages."publicSuffix"to the API permissions list inpermissionsandoptional_permissions.Related issues and pull requests
Related BCD changes in mdn/browser-compat-data#29822