Skip to content

update window.browser spec per #532 #546

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Nov 7, 2024

Conversation

patrickkettner
Copy link
Contributor

Fixes #532

Copy link
Member

@oliverdunk oliverdunk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Patrick! I left a review with some wording suggestions. I know there was some concern in the last meeting about if it made sense to do this (and I'm still not fully sure) so I think we should get approval from @Rob--W and others before deciding if we merge.

@patrickkettner
Copy link
Contributor Author

@oliverdunk thanks for the review! I believe I addressed everything in the last update, so another look at some point would be appreciated!

@Rob--W I'd love any feedback you have

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides the review, another thought related to your comment at #532 (comment)

Whether or not chrome.foo = "bar" would automatically make browser.foo === "bar" is left up to the user agent to decide. (With our proposal, this would be false. My understanding was that Firefox was fine with changing to match behavior, but Safari was not interested in changing their strict aliasing as they didn't have anything on chrome they didn't also want on browser)

The thought occurred to be that there may be little point in distinguishing the browser and chrome namespaces. Any existing property of chrome is de facto reserved, because if another browser were to introduce a new API under browser.loadTimes, for example, then developers would be surprised when they use chrome.loadTimes with the expectation of browser.loadTimes pointing to the same object. browser as a namespace explicitly permits UA-specific additions, which is good enough to allow Chrome to expose chrome.csi as browser.csi, but as a browser-specific "extension" API. Thoughts on this one?

xeenon
xeenon previously approved these changes Feb 27, 2024
@xeenon xeenon dismissed their stale review February 28, 2024 02:11

Sorry, I was under the impression I was just approving the typo commit, not this whole PR.

I need to find some time still to comment on this as a whole.

@patrickkettner
Copy link
Contributor Author

The thought occurred to be that there may be little point in distinguishing the browser and chrome namespaces

@Rob--W My thought process was that a developer may be surprised to see that modifying browser.foo has different effect to chrome.foo in different browsers. Since testing showed that to be true, it makes sense to attempt to standardize behavior to remove that surprise. Since we all have unique behavior (if you count our plan as a behavior), there would be some kind of change somewhere for that behavior to be consistent.
If no one plans on changing their behavior, then I agree that there is no point in specing out the behavior, since it is just saying "anyone can do whatever they want". But if we want to align on expectations, then it makes sense to me to write down what those expectations are.

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Chrome is unwilling to have chrome === browser that Safari and Firefox already supports, we will spec the "not direct alias" behavior.

Copy link
Member

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xeenon Does this look good to you too?

@xeenon xeenon merged commit e62ab22 into w3c:main Nov 7, 2024
1 of 3 checks passed
zombie added a commit to zombie/webextensions that referenced this pull request Apr 16, 2025
* Publish minutes of 2023-05-25 meeting

* Publish minutes of 2023-06-08 meeting

* Publish minutes of 2023-06-22 meeting

* Update chair and editor information

* Update charter.md

Co-authored-by: J. Ryan Stinnett <[email protected]>

* Publish minutes of 2023-07-06 meeting

* Add ReadingList API proposal

* Update affiliations in charter

Modify the Chair and Editor affiliations to match the format described in the [W3C Manual of Style](https://www.w3.org/Guide/manual-of-style/#affs).

* Update URL parameter description in all dictionaries

* Add emoji & calendar link

* Publish minutes of 2023-07-20 meeting

* Create persistence-of-states.md

Add a memo for w3c#424

* Publish minutes of 2023-08-03 meeting

* Update reading_list.md

Updates the schema to reflect the current state of implementation on the readingList api

* Publish minutes of 2023-08-17 meeting

* Update reading_list.md

Updated description for url properties with a brief description with what urls are allowed in the reading list.

Changes OnEntryWillBeRemoved -> OnEntryRemoved

* Remove supportsPromises from the events

* Publish minutes of 2023-08-31 meeting

* Publish minutes of 2023-09-11 TPAC meeting

* Publish minutes of 2023-09-12 TPAC meeting

* Publish minutes of 2023-09-14 meeting

* Publish minutes of 2023-09-28 meeting

* Publish minutes of extra TPAC 2023 meetings

* Publish minutes of 2023-10-12 meeting

* Publish minutes of 2023-10-26 meeting

* Typo fix

* Update table with persistence of APIs

* Fix action.set in MV2

* Publish minutes of 2023-11-09 meeting

* Add sections from TPAC 2023 draft

During TPAC 2023 we held a breakout session to discuss what content we should include in the specification draft. That content was captured in [this google doc][1]. This commit migrates the draft spec outline in that document to our spec file.

[1]: https://docs.google.com/document/d/1q9hQgwTVvyujEhvr52ALeTtuYxyzFhQPfRwPg_hBXlI/edit

* Publish minutes of 2023-11-23 meeting

* action.onUserSettingsChanged proposal

* Publish minutes of 2023-12-07 meeting

* Update index.bs

Co-authored-by: Oliver Dunk <[email protected]>

* Update index.bs

Co-authored-by: Oliver Dunk <[email protected]>

* Change event to use addListener() and removeListener()

* Publish minutes of 2024-01-04 meeting

* Publish minutes of 2024-01-18 meeting

* onUserSettingsChanged returns only the items changed

* update bikeshed build to support multiple bikeshed files

* update window.browser spec

* Publish minutes of 2024-02-01 meeting

* Add content scripts section in specification

* Update .pr-preview.json

update pr-preview config to point to correct location of the specification

* Publish minutes of 2024-02-15 meeting

* Publish minutes of 2024-02-29 meeting

* Add proposal processes (w3c#543)

* Add proposal processes

Add a new proposal process for API changes. This includes a doc describing
the process and a template from which proposals may be made.

* Update the proposal process with feedback from Rob and Timothy.

---------

Co-authored-by: Devlin Cronin <[email protected]>

* Add proposals/README.md

Add a new README file for the proposals subdirectory detailing the
contents of the directory and linking to the new proposal process.

* Update window.browser spec status

* Update Simeon's affiliation

* 2024 time zone switch (PST -> PDT)

* Publish minutes of 2024-03-14 meeting

* Browser-specific needs-triage labels (w3c#562)

* Update labeler.yml

Replace the general "needs-triage" label with browser-specific versions of the needs-triage label.

* Update .github/labeler.yml

* Update .github/labeler.yml

* Update .github/labeler.yml

* Update .github/labeler.yml

Co-authored-by: Rob Wu <[email protected]>

---------

Co-authored-by: Rob Wu <[email protected]>

* Add permissions.requestSiteAccess() API proposal (w3c#529)

* Add permissions.requestSiteAccess() API proposal

* Update existing workaround to be more browser inclusive

* Update proposal based on comment threads

- Update Background section to take into account different browser's behavior
- Update Other Alternatives Considered section to explain in better detailed why Chrome is not supportive of declarative urls

* Add url option parameter and return value

Proposal has been updated so it can fit every browsers model by adding a url option parameter, with this requirements:
- In Chrome, we can require tab ID or document ID, but not `url`.
- In Safari, they can require `url`, but not `tabId` or `documentId`.
- If both are provided, they'll both be respected.

It also adds a method to remove the request and specifies when the methods resolve

* Change title

* Address comments after 02/29 WECG meeting

- Change name to `permissions.addSiteAccessRequest()`
- Fix API comments

* Small typos in proposal

* Add inactive tab behavior

* Apply suggestions from code review

Co-authored-by: Rob Wu <[email protected]>

* Update 'Other alternatives considered' with url pattern usage

---------

Co-authored-by: EmiliaPaz <[email protected]>
Co-authored-by: Rob Wu <[email protected]>

* Add userScripts.execute() API proposal (w3c#540)

* Add userScripts.execute() API proposal

* Apply suggestions from code review

Addressed @Rob--W comments:
  - Add errors property to InjectionResult
  - Nits

Co-authored-by: Rob Wu <[email protected]>

* Minor typos: add commas and remove backticks on browser

---------

Co-authored-by: EmiliaPaz <[email protected]>
Co-authored-by: Rob Wu <[email protected]>

* Indicate some implementors allow JSON comments in manifest.json

* Fix heading levels in specification.

We were using ## as the top level heading but this does not match
the expectation of bikeshed.

* Add guidance on the review expectations of proposals

As we discussed at the in-person WECG meet-up, we should add
expectations around review practices. This PR adds documentation
for those practices.

* Add references to proposing API changes in CONTRIBUTING.md

* Publish minutes of 2024-03-28 meeting

* Address Simeon's comments

* Expand the API proposal to include a "behavior" section

The behavior of certain APIs may not be immediately clear from the
API schema. Add a separate section for "behavior" to allow authors
to specify notes related to the behavior of the API if they are non-
obvious.

* Publish minutes of 2024-04-11 meeting

* Provide guidance on developer feedback in the proposal process

Expand the proposal process to indicate that developer feedback is
desirable and a core part of the proposal process. Merge managers
should ensure developer feedback is carefully considered before
merging proposals.

* Add reference to Code of Conduct in proposal_process.md

* Add ARTIFACT_NAME to w3c/spec-prod invocation

Adds the ARTIFACT_NAME input value to avoid an issue where
conflicting artifacts were added and the workflow would fail.

* Publish minutes of 2024-03-18 - 2024-03-20 meetings in San Diego

* Publish minutes of 2024-04-25 meeting

* Proposal: Multiple user script worlds (w3c#560)

* Proposal: Multiple user script worlds

This adds a new API proposal for supporting multiple user script worlds,
allowing user script managers to better isolate individual user scripts
when multiple may be injected on a given site.

This proposal follows the new API proposal process.

* Address Rob's and Timothy's feedback

* Update diff styling

* Collapse code sections since diffing makes it clear

* Expand API for better world management

Expand the proposal to include:
- Two new functions, `removeWorld()` and `getWorldConfigurations()`.
- Notes about how the worlds behave when injecting.
- Notes on world persistence and world limits.

* Address Rob's latest comments

* Address more review comments

* Fix trailing parenthesis

* Publish minutes of 2024-05-09 meeting

* dark-mode: Add a proposal for dark mode extension icons (w3c#585)

Co-authored-by: Rob Wu <[email protected]>
Co-authored-by: Oliver Dunk <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: Timothy Hatcher <[email protected]>
Co-authored-by: Simeon Vincent <[email protected]>

* Add proposal for manifest key trial_tokens

* feedback

* feedback

* typos

* Valid json and consistent use of color_scheme

* Use a plural array type like `"permissions"` for simplicity

* Publish minutes of 2024-05-23 meeting

* revise contexMenus persistent state for Firefox and Chrome

* Publish minutes of 2024-06-06 meeting

* Publish minutes of 2024-06-20 meeting

* Add getKeys() proposal

* Fix warning about Node version in triage workflow

* Fix a warning about Node version in deploy workflow

* Update SIDE_PANEL in runtime.getContexts() proposal

Addresses the feedback in w3c#498.

* Update proposals/storage-get-keys.md

Co-authored-by: Rob Wu <[email protected]>

* Update proposals/storage-get-keys.md

Co-authored-by: Rob Wu <[email protected]>

* Update proposals/storage-get-keys.md

Co-authored-by: Rob Wu <[email protected]>

* Update proposals/runtime_get_contexts.md

Co-authored-by: Rob Wu <[email protected]>

* Fix URL in spec

* Publish minutes of 2024-07-04 meeting

* Publish minutes of 2024-07-18 meeting

* Publish minutes of 2024-08-01 meeting

* Publish minutes of 2024-08-15 meeting

* Add developer tools contexts in runtime.getContexts() proposal

* Update link

* Document frameId

* Mention the fields which do not need special handling

* Publish minutes of 2024-08-29 meeting

* Proposal: add hasCrossSiteAncestor value to partitionKey in Cookies API (w3c#581)

Co-authored-by: Rob Wu <[email protected]>
Co-authored-by: Oliver Dunk <[email protected]>
Co-authored-by: bvandersloot-mozilla <[email protected]>

* Publish minutes of 2024-09-12 meeting

* Address feedback

* Clarify behavior of omitting RegisteredUserScript.worldId

* Add type definitions for methods on RegisteredUserScript

* Clarify how userScripts methods are affected

* Publish minutes of 2024-09-26 meeting

* Update minute export tool to support rendered code

Until now, code formatting required backticks in the source document.
But Google Docs can also contain inline code (greenish text) or code
blocks, via Markdown mode (Tools > Preferences > "Enable Markdown").
Previously, this was converted to plain text. With the updated tool,
inline code is wrapped in single backticks, and code blocks are
wrapped in triple backticks.

This also adds h4 support because a recent meeting used h4 headings.

* Publish minutes of 2024-09-23 - 2024-09-27 TPAC meetings

* Fix typo

* Use "may" for behavior of non-wildcard path in match_origin_as_fallback

* Use document rather than frame in inejct a content script algorithm

* Publish minutes of 2024-10-10 meeting

* update window.browser spec per w3c#532 (w3c#546)

* update window.browser spec per w3c#532

Co-authored-by: Rob Wu <[email protected]>

* GetPartitionKey updates (w3c#712)

Co-authored-by: Rob Wu <[email protected]>
Co-authored-by: Oliver Dunk <[email protected]>
Co-authored-by: Heiko Theißen <[email protected]>
Co-authored-by: bvandersloot-mozilla <[email protected]>

* Publish minutes of 2024-11-07 meeting

* Address feedback

* Publish minutes of 2024-11-21 meeting

* Rename addSiteAccessRequest to addHostAccessRequest.

This follows discussion in the last meeting:

w3c#529 (comment)

* Add proposal for runtime.onEnabled and runtime.onExtensionLoaded events

* Add "reload" reason

* Rename event arguments

* Publish minutes of 2024-12-05 meeting

* Rename 'started' load reason to 'startup'

* Publish minutes of 2024-12-19 meeting

* Add hasListener() to event interface

* Fixup 2024-12-19 minutes

* Clarify behavior of userScripts API

- Use empty string instead of unspecified/null as the default worldId,
  following w3c#565 (comment)

- Declare "js" property as optional with remark that it is required in
  "register", to enable `userScripts.update()` without requiring "js".

- Expand on RegisteredUserScript validation, notably on validating
  matches+includeGlobs after an update.

- Update `resetWorldConfiguration()` signature to match Chrome's and
  Firefox's actual implementation: `worldId` is optional.

- Create a new section "World Configurations" and specify world
  configuration behavior more precisely. In particular, clarify fallback
  behavior, following
  w3c#565 (comment)

- Mention Firefox's optional-only "userScripts" permission design.

- Add `worldId` to userScripts.execute proposal.

* Update userScripts.execute() to receive multiple js soruces

Updated as discussed in w3c#477 (comment)

* Address feedback on matching about: frames

* Publish minutes of 2025-01-16 meeting

* Remove a confusing example and add information about split mode incognito contexts

* Use precursor origin terminology in determine URL algorithm

* Apply suggestions from code review

Co-authored-by: Timothy Hatcher <[email protected]>

* Publish minutes of 2025-01-30 meeting

* Clarify repeated firing in split mode incognito contexts

Co-authored-by: Rob Wu <[email protected]>

* Use latest Ubuntu version for GitHub deploy workflow (w3c#757)

Our deploy workflow was failing because it was using an older version of
Ubuntu (which in turn had an older version of Python). Update our YML
configuration to use the latest version.

I considered pinning to a newer version but this matches both our other
workflows and the w3c/spec-prod repo [1] so seems like a better choice.

[1] https://github.com/w3c/spec-prod/blob/main/.github/workflows/docs.yml

* Specification for loading extensions in WebDriver Classic

* Apply suggestions from code review

Co-authored-by: Rob Wu <[email protected]>

* Fix indentation and references

* Publish minutes of 2025-02-13 meeting

* Additional formatting fixes.

* Update specification for loading web extensions in WebDriver Classic

As specified in the BiDi spec, the resource for "path" and "archivePath" should be held in
parameters["path"] and "base64" should be in parameters["value"].

https://www.w3.org/TR/webdriver-bidi/#command-webExtension-install

* Add webdriver-classic.bs to the specs published on GitHub Pages

* Fix HTML validation errors in webdriver-classic.bs

See https://github.com/w3c/webextensions/actions/runs/13446680991/job/37573446021

* Address feedback from Devlin

* Publish minutes of 2025-02-27 meeting

* Publish minutes of 2025-03-13 meeting

* IconVariants: Correct spelling and describe some fallback behavior

* Proposal: i18n-system-languages (w3c#569)

* Add getOSLanguage proposal

* Update proposals/i18n-getOSLanguage.md

Co-authored-by: rdcronin <[email protected]>

* Update proposals/i18n-getOSLanguage.md

Co-authored-by: rdcronin <[email protected]>

* Update workaround description

* Add back Sponsoring Browser with TBD

* Add Bugzilla bug to related issues

* Add Author GitHub link

* Add bcp47 link

* Rephrase objective

* Rename IETF tags to BCP47 language tags

* Remove > from title

* Replace chromium source reference with a permalink

* Update proposals/i18n-getOSLanguage.md

Co-authored-by: Addison Phillips <[email protected]>

* Update proposal to include both getPreferredSystemLanguages and getSystemUILanguage

* Rename proposal file to better reflect the proposal

* Fix proposal title

* Update proposals/i18n-system-languages.md

Co-authored-by: Pavel Djundik <[email protected]>

* Update proposals/i18n-system-languages.md

Co-authored-by: Addison Phillips <[email protected]>

* Clarify the type of list returned by getPreferredSystemLanguages

* Rewrite sentences to use locale instead of language when it makes sense

* Add purest form use-case

* Update proposals/i18n-system-languages.md

Co-authored-by: Simeon Vincent <[email protected]>

* Clarify additional subtags on getSystemUILanguage

* Update getSystemUILanguage to be async

* Clarify getPreferredSystemLanguages callback parameter

* Clarify getPreferredSystemLanguages would not insert less specific locale tags

* Remove additional subtags note on getSystemUILanguage

* Update proposals/i18n-system-languages.md

Co-authored-by: Rob Wu <[email protected]>

* Update proposals/i18n-system-languages.md

Co-authored-by: Rob Wu <[email protected]>

* Update proposals/i18n-system-languages.md

Co-authored-by: Rob Wu <[email protected]>

* Fix sync > async. Address language > locale

---------

Co-authored-by: rdcronin <[email protected]>
Co-authored-by: Addison Phillips <[email protected]>
Co-authored-by: Pavel Djundik <[email protected]>
Co-authored-by: Simeon Vincent <[email protected]>
Co-authored-by: Rob Wu <[email protected]>

* fixup webdriver-classic: drop "type" from li

Markup validation fails due to:

> The “type” attribute on the “li” element is obsolete. Use CSS instead.

The `<ol>` that this `<li>` is part of already has
`list-style-type:lower-latin`, which means that the `type='a'` attribute
can be dropped without replacement.

* Publish minutes of 2025-03-27 meeting

---------

Co-authored-by: Rob Wu <[email protected]>
Co-authored-by: Simeon Vincent <[email protected]>
Co-authored-by: Simeon Vincent <[email protected]>
Co-authored-by: J. Ryan Stinnett <[email protected]>
Co-authored-by: dljames <[email protected]>
Co-authored-by: Darryl James <[email protected]>
Co-authored-by: Jackie(Guokai) Han <[email protected]>
Co-authored-by: Oliver Dunk <[email protected]>
Co-authored-by: EmiliaPaz <[email protected]>
Co-authored-by: Emilia Paz <[email protected]>
Co-authored-by: Patrick Kettner <[email protected]>
Co-authored-by: rdcronin <[email protected]>
Co-authored-by: Devlin Cronin <[email protected]>
Co-authored-by: Solomon Kinard <[email protected]>
Co-authored-by: Oliver Dunk <[email protected]>
Co-authored-by: carlosjeurissen <[email protected]>
Co-authored-by: Timothy Hatcher <[email protected]>
Co-authored-by: Anton Bershanskiy <[email protected]>
Co-authored-by: Mukul P <[email protected]>
Co-authored-by: Daniel Jacobs <[email protected]>
Co-authored-by: Luke Warlow <[email protected]>
Co-authored-by: Sohail Rajdev <[email protected]>
Co-authored-by: Aaron Selya <[email protected]>
Co-authored-by: bvandersloot-mozilla <[email protected]>
Co-authored-by: Heiko Theißen <[email protected]>
Co-authored-by: Sohail Rajdev <[email protected]>
Co-authored-by: Kiara Rose <[email protected]>
Co-authored-by: Timothy Hatcher <[email protected]>
Co-authored-by: Sam Sneddon <[email protected]>
Co-authored-by: kiaraarose <[email protected]>
Co-authored-by: Addison Phillips <[email protected]>
Co-authored-by: Pavel Djundik <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Determine the nuances of aliasing chrome and browser
4 participants