Skip to content

Commit

Permalink
Merge branch 'main' into brian-learn-move
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmth committed Dec 10, 2024
2 parents 8fc5705 + c6f8bee commit 9797f65
Show file tree
Hide file tree
Showing 118 changed files with 1,354 additions and 1,433 deletions.
1 change: 1 addition & 0 deletions .vscode/dictionaries/code-entities.txt
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,7 @@ reflectionchange
removestream
replacewithcommas
replacewithspaces
RFCOMM
RGBX
RGUI
richlistbox
Expand Down
20 changes: 20 additions & 0 deletions files/en-us/glossary/source_map/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Source map
slug: Glossary/Source_map
page-type: glossary-definition
---

{{GlossarySidebar}}

A **source map** is a file that maps between minified or transformed code received by the browser and its original unmodified form, allowing the original code to be reconstructed and used when debugging.

The JavaScript code executed by the browser has often been transformed in some way from the original source created by a developer.
For example, sources are often combined and minified to make delivering them from the server more efficient.
Additionally, JavaScript running on a page is often machine-generated, such as compiled from a language like TypeScript.

In these situations, debugging the original source is much easier than the source in the transformed state that the browser has downloaded.

## See also

- HTTP {{HTTPHeader("SourceMap")}} response header
- [Firefox Developer Tools: using a source map](https://firefox-source-docs.mozilla.org/devtools-user/debugger/how_to/use_a_source_map/index.html)
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Nodes are also referred to by their position in the tree relative to other nodes
- **Child node**: A node _directly_ inside another node. For example, `IMG` is a child of `SECTION` in the above example.
- **Descendant node**: A node _anywhere_ inside another node. For example, `IMG` is a child of `SECTION` in the above example, and it is also a descendant. `IMG` is not a child of `BODY`, as it is two levels below it in the tree, but it is a descendant of `BODY`.
- **Parent node**: A node which has another node inside it. For example, `BODY` is the parent node of `SECTION` in the above example.
- **Sibling nodes**: Nodes that sit on the same level in the DOM tree. For example, `IMG` and `P` are siblings in the above example.
- **Sibling nodes**: Nodes that sit on the same level under the same parent node in the DOM tree. For example, `IMG` and `P` are siblings in the above example.

It is useful to familiarize yourself with this terminology before working with the DOM, as a number of the code terms you'll come across make use of them. You'll also come across them in CSS (e.g. descendant selector, child selector).

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/mdn/community/communication_channels/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Check out the MDN-specific [discussion guidelines](/en-US/docs/MDN/Community/Dis

## Social media

You can follow MDN Web Docs on [Mastodon](https://mozilla.social/@mdn) and [X](https://x.com/MozDevNet).
You can follow MDN Web Docs on [Mastodon](https://mastodon.social/@mdn) and [X](https://x.com/MozDevNet).
Feel free to tag us in your posts if you want to share something with us or say hello, although we can't guarantee that we can respond to everything.

## Forums
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ browser.tabs.onUpdated.addListener(handleUpdated);

### Filtering examples

Log changes only to tabs whose `url` property is [matched](/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) by `https://developer.mozilla.org/*` or `https://mozilla.social/@mdn`:
Log changes only to tabs whose `url` property is [matched](/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) by `https://developer.mozilla.org/*` or `https://mastodon.social/@mdn`:

```js
const pattern1 = "https://developer.mozilla.org/*";
const pattern2 = "https://mozilla.social/@mdn";
const pattern2 = "https://mastodon.social/@mdn";

const filter = {
urls: [pattern1, pattern2],
Expand Down Expand Up @@ -176,11 +176,11 @@ function handleUpdated(tabId, changeInfo, tabInfo) {
browser.tabs.onUpdated.addListener(handleUpdated, filter);
```

Combine both the previous filters, log only when the `pinned` property of tabs changes for tabs whose `url` property is [matched](/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) by `https://developer.mozilla.org/*` or `https://mozilla.social/@mdn`:
Combine both the previous filters, log only when the `pinned` property of tabs changes for tabs whose `url` property is [matched](/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) by `https://developer.mozilla.org/*` or `https://mastodon.social/@mdn`:

```js
const pattern1 = "https://developer.mozilla.org/*";
const pattern2 = "https://mozilla.social/@mdn";
const pattern2 = "https://mastodon.social/@mdn";

const filter = {
urls: [pattern1, pattern2],
Expand All @@ -196,11 +196,11 @@ function handleUpdated(tabId, changeInfo, tabInfo) {
browser.tabs.onUpdated.addListener(handleUpdated, filter);
```

Log changes only when the `pinned` property of tabs changes for tabs whose `url` property is [matched](/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) by `https://developer.mozilla.org/*` or `https://mozilla.social/@mdn` where the tab was part of the current browser window when the update event fired:
Log changes only when the `pinned` property of tabs changes for tabs whose `url` property is [matched](/en-US/docs/Mozilla/Add-ons/WebExtensions/Match_patterns) by `https://developer.mozilla.org/*` or `https://mastodon.social/@mdn` where the tab was part of the current browser window when the update event fired:

```js
const pattern1 = "https://developer.mozilla.org/*";
const pattern2 = "https://mozilla.social/@mdn";
const pattern2 = "https://mastodon.social/@mdn";

const filter = {
urls: [pattern1, pattern2],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ browser-compat: webextensions.api.webNavigation.onCompleted

{{AddonSidebar}}

Fired when a document, including the resources it refers to, is completely loaded and initialized. This is equivalent to the DOM [`load`](/en-US/docs/Web/API/Window/load_event) event.
Fired when a document, including the resources it refers to, is completely loaded and initialized. This is equivalent to the window [`load`](/en-US/docs/Web/API/Window/load_event) event.

## Syntax

Expand Down
Loading

0 comments on commit 9797f65

Please sign in to comment.