Skip to content

Commit

Permalink
Merge branch 'main' into update-fetch-groupdata
Browse files Browse the repository at this point in the history
  • Loading branch information
wbamberg authored Jul 3, 2024
2 parents 250148a + 413ce1e commit 950f913
Show file tree
Hide file tree
Showing 17 changed files with 319 additions and 326 deletions.
3 changes: 0 additions & 3 deletions files/en-us/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -398,11 +398,8 @@
/en-US/docs/CSS/:-moz-ui-valid /en-US/docs/Web/CSS/:user-valid
/en-US/docs/CSS/:-moz-user-disabled /en-US/docs/Web/CSS/:-moz-user-disabled
/en-US/docs/CSS/:-moz-window-inactive /en-US/docs/Web/CSS/:-moz-window-inactive
/en-US/docs/CSS/::-moz-page /en-US/docs/Web/CSS/::-moz-page
/en-US/docs/CSS/::-moz-page-sequence /en-US/docs/Web/CSS/::-moz-page-sequence
/en-US/docs/CSS/::-moz-placeholder /en-US/docs/Web/CSS/::placeholder
/en-US/docs/CSS/::-moz-progress-bar /en-US/docs/Web/CSS/::-moz-progress-bar
/en-US/docs/CSS/::-moz-scrolled-page-sequence /en-US/docs/Web/CSS/::-moz-scrolled-page-sequence
/en-US/docs/CSS/::-moz-selection /en-US/docs/Web/CSS/::selection
/en-US/docs/CSS/::after /en-US/docs/Web/CSS/::after
/en-US/docs/CSS/::after-redirect-1 /en-US/docs/Web/CSS/::after
Expand Down
36 changes: 0 additions & 36 deletions files/en-us/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -73357,30 +73357,6 @@
"Sheppy"
]
},
"Web/CSS/::-moz-page": {
"modified": "2020-10-15T21:08:00.388Z",
"contributors": [
"wbamberg",
"ExE-Boss",
"fscholz",
"teoli",
"mfluehr",
"Sebastianz",
"Sheppy"
]
},
"Web/CSS/::-moz-page-sequence": {
"modified": "2020-10-15T21:07:58.857Z",
"contributors": [
"wbamberg",
"ExE-Boss",
"fscholz",
"teoli",
"mfluehr",
"Sebastianz",
"Sheppy"
]
},
"Web/CSS/::-moz-progress-bar": {
"modified": "2020-07-29T00:12:03.398Z",
"contributors": [
Expand Down Expand Up @@ -73431,18 +73407,6 @@
"cvrebert"
]
},
"Web/CSS/::-moz-scrolled-page-sequence": {
"modified": "2020-10-15T21:08:02.632Z",
"contributors": [
"wbamberg",
"ExE-Boss",
"fscholz",
"teoli",
"mfluehr",
"Sebastianz",
"Sheppy"
]
},
"Web/CSS/::-webkit-inner-spin-button": {
"modified": "2020-10-15T21:42:34.532Z",
"contributors": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,6 @@ You don't need to understand anything about other such environments at this stag

In this chapter we've learned what events are, how to listen for events, and how to respond to them.

You've seen by now that elements in a web page can be nested inside other elements. For example, in the [Preventing default behavior](#preventing_default_behavior) example, we have some text boxes, placed inside {{htmlelement("div")}} elements, which in turn are placed inside a {{htmlelement("form")}} element. When happens when an click event listener is attached to the `<form>` element, and the user clicks inside one of the text boxes? This is called _event bubbling_ and is the subject of the next chapter.
You've seen by now that elements in a web page can be nested inside other elements. For example, in the [Preventing default behavior](#preventing_default_behavior) example, we have some text boxes, placed inside {{htmlelement("div")}} elements, which in turn are placed inside a {{htmlelement("form")}} element. What happens when a click event listener is attached to the `<form>` element, and the user clicks inside one of the text boxes? This is called _event bubbling_ and is the subject of the next chapter.

{{LearnSidebar}}{{PreviousMenuNext("Learn/JavaScript/Building_blocks/Return_values","Learn/JavaScript/Building_blocks/Event_bubbling", "Learn/JavaScript/Building_blocks")}}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ browser-compat: webextensions.api.contentScripts.register

Use this function to register one or more content scripts.

It accepts one parameter, which is an object with similar properties to the objects given in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) manifest key (but note that `content_scripts` is an array of objects, while the argument to `register()` is a single object).
It accepts one parameter, which is an object with similar properties to the objects given in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) manifest key (but note that `content_scripts` is an array of objects, while the argument to `register()` is one object).

This is an asynchronous function that returns a [`Promise`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).

Expand All @@ -33,27 +33,29 @@ let registering = browser.contentScripts.register(
The `RegisteredContentScriptOptions` object has the following properties:

- `allFrames` {{optional_inline}}
- : Same as `all_frames` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) key.
- : Same as [`all_frames` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#all_frames) key.
- `cookieStoreId` {{optional_inline}}
- : A string or array of strings. Registers the content script in the tabs that belong to one or more cookie store IDs. This enables scripts to be registered for all default or non-contextual identity tabs, private browsing tabs (if the [extension is enabled in private browsing](https://support.mozilla.org/en-US/kb/extensions-private-browsing)), the tabs of a [contextual identity](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities), or a combination of these. See [Work with contextual identities](/en-US/docs/Mozilla/Add-ons/WebExtensions/Work_with_contextual_identities) for more information.
- `css` {{optional_inline}}
- : An array of objects. Each object has either a property named `file`, which is a URL starting at the extension's manifest.json and pointing to a CSS file to register, or a property named `code`, which is some CSS code to register.
- `excludeGlobs` {{optional_inline}}
- : Same as `exclude_globs` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) key.
- : Same as [`exclude_globs` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#exclude_globs) key.
- `excludeMatches` {{optional_inline}}
- : Same as `exclude_matches` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) key.
- : Same as [`exclude_matches` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#exclude_matches) key.
- `includeGlobs` {{optional_inline}}
- : Same as `include_globs` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) key.
- : Same as [`include_globs` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#include_globs) key.
- `js` {{optional_inline}}
- : An array of objects. Each object has either a property named `file`, which is a URL starting at the extension's manifest.json and pointing to a JavaScript file to register, or a property named `code`, which is some JavaScript code to register.
- `matchAboutBlank` {{optional_inline}}
- : Same as `match_about_blank` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#match_about_blank) key.
- : Same as [`match_about_blank` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#match_about_blank) key.
- `matchOriginAsFallback` {{optional_inline}}
- : Same as `match_origin_as_fallback` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#match_origin_as_fallback) key.
- : Same as [`match_origin_as_fallback` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#match_origin_as_fallback) key.
- `matches`
- : Same as `matches` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) key.
- : Same as [`matches` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#matches) key.
- `runAt` {{optional_inline}}
- : Same as `run_at` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) key.
- : Same as [`run_at` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#run_at) key.
- `world` {{optional_inline}}
- : The execution environment for a script to execute in. Same as [`world` in the `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts#world) key.

### Return value

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@ Values of this type are strings. Possible values are:

> **Warning:** Due to the lack of isolation, the web page can detect and interfere with the executed code.
> Do not use the `MAIN` world unless it is acceptable for web pages to read, access, or modify the logic or data that flows through the executed code.
> `MAIN` is not supported in Firefox (although it is planned, and the work to introduce it is tracked by [Bug 1736575](https://bugzil.la/1736575)). In the meantime, JavaScript code running in the isolated content script sandbox can use the Firefox "Xray vision" feature, as described in [Share objects with page scripts](/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts).
{{WebExtExamples("h2")}}

## Browser compatibility

{{Compat}}

{{WebExtExamples}}

> **Note:** This API is based on Chromium's [`chrome.scripting`](https://developer.chrome.com/docs/extensions/reference/scripting/#type-ExecutionWorld) API.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ Details of all the keys you can include are given in the table below.
</tr>
<tr>
<td>
<a id="run_at"><code>world</code></a>
<a id="world"><code>world</code></a>
</td>
<td><code>String</code></td>
<td>
Expand All @@ -314,7 +314,6 @@ Details of all the keys you can include are given in the table below.
<p>
<strong>Warning:</strong> Due to the lack of isolation, the web page can detect and interfere with the executed code.
Do not use the <code>MAIN</code> world unless it is acceptable for web pages to read, access, or modify the logic or data that flows through the executed code.
<code>world</code>, and therefore <code>"MAIN"</code>, is not supported in Firefox (although it is planned, and the work to introduce it is tracked by <a href="https://bugzil.la/1736575" class="external" target="_blank">Bug 1736575</a>). In the meantime, JavaScript code running in the isolated content script sandbox can use the Firefox "Xray vision" feature, as described in <a href="/en-US/docs/Mozilla/Add-ons/WebExtensions/Sharing_objects_with_page_scripts">Share objects with page scripts</a>.
</p>
</div>
</dd>
Expand Down
1 change: 1 addition & 0 deletions files/en-us/mozilla/firefox/releases/128/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ This article provides information about the changes in Firefox 128 that affect d
- Adds the ability to enable and disable rules in static declarative net request rulesets with {{WebExtAPIRef("declarativeNetRequest.updateStaticRules")}} and list disabled rules for a static ruleset with {{WebExtAPIRef("declarativeNetRequest.getDisabledRuleIds")}} ([Firefox bug 1810762](https://bugzil.la/1810762))
- The default value of {{WebExtAPIRef("proxy.settings")}} property `proxyDNS` is now `false` when using SOCKS4 and `true` when using SOCKS5. Previously, it defaulted to `false` for SOCKS4 and SOCKS5 ([Firefox bug 1741375](https://bugzil.la/1741375)).
- The non-standard Web API events `overflow` and `underflow` have been deprecated. Use of these events should be removed from extension documents before the release of Firefox 131 ([Firefox bug 1898445](https://bugzil.la/1898445)).
- Support is now provided for scripts to run in the web page execution environment. This is provided through support for `MAIN` in {{WebExtAPIRef("scripting.executionWorld","ExecutionWorld")}} for the {{WebExtAPIRef("scripting")}} API, the addition of `world` to the {{WebExtAPIRef("contentScripts.register()")}} API, and support for `world` in the [`content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) manifest key ([Firefox bug 1736575](https://bugzil.la/1736575)).
- The {{WebExtAPIRef("scripting")}} API can now inject scripts and CSS into sandboxed pages with `about:blank`, `about:srcdoc`, and `data:` URLs. This was implemented for {{WebExtAPIRef("scripting.executeScript")}}, {{WebExtAPIRef("scripting.insertCSS")}}, and {{WebExtAPIRef("scripting.removeCSS")}} in [Firefox bug 1475831](https://bugzil.la/1475831) and {{WebExtAPIRef("scripting.registerContentScripts")}} and {{WebExtAPIRef("scripting.updateContentScripts")}} in [Firefox bug 1853411](https://bugzil.la/1853411) through the introduction of `matchOriginAsFallback` to {{WebExtAPIRef("scripting.RegisteredContentScript")}}.
- The [manifest key `content_scripts`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/content_scripts) now supports `match_origin_as_fallback` and {{WebExtAPIRef("contentScripts.register")}} `matchOriginAsFallback`, enabling scripts to be injected into `about:`, `data:`, and `blob:` pages when the document origin is opaque due to the use of CSP or iframe sandbox ([Firefox bug 1475831](https://bugzil.la/1475831) and [Firefox bug 1896669](https://bugzil.la/1896669)). In addition, scripts registered with the `content_scripts` manifest key can now only run in `blob:` pages when `match_origin_as_fallback` is `true` ([Firefox bug 1897113](https://bugzil.la/1897113)).

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mozilla/firefox/releases/7/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ The following interfaces were removed as part of the removal of the ActiveX embe
### Other Changes

- The structure of the library window (`places.xul`) [has been cleaned up](https://bugzil.la/588027). This [may break extensions](https://bugzil.la/677417) and themes.
- The look of the print preview window [has been modernized](https://bugzil.la/663028) and theme authors are encouraged to style it using the CSS pseudo-elements {{ cssxref("::-moz-page") }}, {{ cssxref("::-moz-page-sequence") }} and {{ cssxref("::-moz-scrolled-page-sequence") }}.
- The look of the print preview window [has been modernized](https://bugzil.la/663028) and theme authors are encouraged to style it using the CSS pseudo-elements `::-moz-page`, `::-moz-page-sequence` and `::-moz-scrolled-page-sequence`.

## See also

Expand Down
Loading

0 comments on commit 950f913

Please sign in to comment.