Skip to content

Commit

Permalink
Move new contrib docs (#18041)
Browse files Browse the repository at this point in the history
* Move new contrib docs

* underscores

* renaming

* removing redirect about

* creating moving

* experimental

* does belong

* editorial

* code style guide

* writing style guide

* howto and seo

* related_criteria for inclusion

* file rename, link update

* Updated Syntax for fetch-related pages (#17914)

* Updated Syntax

* port changes

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* Fix wrong example quote (#18458)

* Unshorten code in method definition (#18457)

* fixes #18444

* Update index.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* fix: correct the language of code examples (#18455)

* Add `const` var declaration to FileSystemFileHandle sample code  (#17930)

* Add `const` var declaration

* Update index.md

* Update index.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* Update dom-examples links (#18462)

* MediaRecorder: Update dom-examples links (#18464)

* Update dom-example link (#18465)

* update a broken link (#18466)

* remove a broken link (#18467)

* Update a broken link (#18468)

* Fixes broken live sample (#18456)

* Intl.NumberFormat - flyby fixes (#18258)

* Fix `channelCount` semantics in `MediaStreamAudioSourceNode`. (#18472)

* Fix `channelCount` semantics.

This sparked confusion, e.g. in WebAudio/web-audio-api#2496.

Source: I am this specification's editor.

* Fix markup.

* Fix parenthesis

* Fix `channelCount` semantics. (#18473)

* Fix `channelCount` semantics.

This sparked confusion, e.g. in WebAudio/web-audio-api#2496.

Source: I am this specification's editor.

* Fix markup.

* Fix parenthesis

* Remove a few pointless references to internal slots (#18461)

* Remove a few pointless references to internal slots

* Update index.md

* Apply suggestions from code review

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* simplify description

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* Fix syntax errors (#18475)

* Fix syntax error

Reported in https://github.com/orgs/mdn/discussions/158 (PR11)
The macro just prints `Deprected` on the next line.

* Fix in blobbuilder

* Remove js annotation for webidl blocks

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* fix: syntax errors in JS example sections (v5) (#18442)

* syntax fixes

* fix remaining syntax errors

* Adapt syntax box

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* Use diff instead of js to mark a diff block (#18477)

* Update good vs bad example

* fix a typo

* marking it as diff

* Bump @mdn/yari from 1.10.0 to 1.10.2 (#18479)

* Correct a few usage of internal methods (#18476)

* Change 'nodes' link to link directly to DOM nodes (#18480)

The link to DOM 'nodes' currently links to the 'nodes' glossary page. I changed the link to DOM 'nodes' to directly link to the DOM nodes page.

* Shorten Global object glossary entry (#18474)

* FF103 Native Error types are serializable (#18384)

* FF104 Native Error types are serializable

* Fix error - this is in FF103, not 104

* Update files/en-us/web/api/web_workers_api/structured_clone_algorithm/index.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* Remove stack info from release note

* Update files/en-us/mozilla/firefox/releases/103/index.md

Co-authored-by: Joshua Chen <sidachen2003@gmail.com>

* Demix invalid event from GlobalEventHandlers (#18451)

* Demix slotchange from GlobalEventHandlers (#18225)

* fix: various typos (#18483)

* Fix typo (#18486)

Remove stray 'a' in "contain a separator characters like the following" -> "contain separator characters like the following"

* Fix link text (#18488)

* Add missing period (#18487)

* fix broken link (#18490)

* Remove continuity descriptions from `steps(...)` (#18482)

As per the spec (https://drafts.csswg.org/css-easing/#step-easing-functions), Figure 5, all step functions are right-continuous (i.e. You'd encounter solid dots approaching discontinuity from the right side). The `direction` keyword should strictly describe when the jumps (i.e. discontinuities) happen.

* OpenType guide: font-variant-position is not mutually exclusive with <sup>/<sub> (#18459)

Thank you!

* Fix links for other references (#18501)

* update a broken link (#18500)

* Comment out ellipsis in code blocks (#18496)

* Comment out ellipsis in code blocks (#18498)

* Comment out ellipsis in code blocks (#18497)

* Elaborate on destructuring assignment (#18495)

* Elaborate on destructuring assignment

* add headings

* Mark kumascript code blocks js -> plain (#18493)

* remove a broken link (#18499)

* remove a broken link

* Apply suggestions from code review

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* Demix pointer capture events from GlobalEventHandlers (#18450)

* Demix pointer capture events from GlobalEventHandlers

* Update files/en-us/web/api/element/lostpointercapture_event/index.md

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* Add event properties section (still seems redundant...)

* Add additional event properties section

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* Improvements to a few Number APIs (#18502)

* Minor spread syntax rewrite (#18503)

* Minor spread syntax rewrite

* Update files/en-us/web/javascript/reference/operators/spread_syntax/index.md

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* Window.open() rework (#18118)

* first pass linting: remove xref macros, fix examples, fix code words

* 2nd pass: remove broken/insecure links, fix remaining typos

* Third pass - rework

* fix flaws

* Apply 1st set of suggestions

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* Taking @teoli2003 review into account

Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>

* Fix broken block code in `Bracket notation` section (#18507)

Add three missing backticks at ending of block code

* Fix typo (#18508)

* Fix missing parenthesis (#18509)

* Mention string iteration goes by Unicode characters (#18504)

* Mention string iteration goes by Unicode characters

* add a flag example

* Fix "repository of wavetables" text's broken link (#18510)

* Add TBD content to files frontmatter and macros

* Add TBD content to more empty files

* TBD content

* Add missing front matter data to files

* Fix slug

* Fix slugs

* fix remaining writing guideline docs

Co-authored-by: Ruth John <rumyra@gmail.com>
Co-authored-by: Prajwal Borkar <sunnyborkar7777@gmail.com>
Co-authored-by: Joshua Chen <sidachen2003@gmail.com>
Co-authored-by: Davide Briano <36935593+buondevid@users.noreply.github.com>
Co-authored-by: Xavi Lee <awxiaoxian2020@163.com>
Co-authored-by: A1lo <yin199909@aliyun.com>
Co-authored-by: Zhang Yi Jiang <mediumdeviation@gmail.com>
Co-authored-by: Onkar Ruikar <87750369+OnkarRuikar@users.noreply.github.com>
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Co-authored-by: Paul Adenot <paul@paul.cx>
Co-authored-by: Jean-Yves Perrier <jypenator@gmail.com>
Co-authored-by: Lion Ralfs <lion.ralfs@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: simonvarey <88859869+simonvarey@users.noreply.github.com>
Co-authored-by: Queen Vinyl Da.i'gyu-Kazotetsu <vinyldarkscratch@gmail.com>
Co-authored-by: Nick Schonning <nschonni@gmail.com>
Co-authored-by: kokke <spam@rowdy.dk>
Co-authored-by: de-oz <101826623+de-oz@users.noreply.github.com>
Co-authored-by: Christopher Dignam <christopher.dignam@segment.com>
Co-authored-by: dshin-moz <102040459+dshin-moz@users.noreply.github.com>
Co-authored-by: J. S. Choi <jschoi@jschoi.org>
Co-authored-by: Masahiro FUJIMOTO <mfujimot@gmail.com>
Co-authored-by: SphinxKnight <SphinxKnight@users.noreply.github.com>
Co-authored-by: Minh-Thuan Nguyen <nmthuan.nmt@gmail.com>
Co-authored-by: Remco van 't Veer <remco@remworks.net>
Co-authored-by: Jeremy Pearson <jeremy.pearson.dev@gmail.com>
Co-authored-by: Schalk Neethling <schalk.neethling@mechanical-ink.co.za>
  • Loading branch information
1 parent e7fed6b commit dcf483a
Show file tree
Hide file tree
Showing 326 changed files with 7,081 additions and 5,516 deletions.
105 changes: 67 additions & 38 deletions files/en-us/_redirects.txt

Large diffs are not rendered by default.

712 changes: 164 additions & 548 deletions files/en-us/_wikihistory.json

Large diffs are not rendered by default.

45 changes: 3 additions & 42 deletions files/en-us/glossary/global_object/index.md
Expand Up @@ -14,50 +14,11 @@ In JavaScript, there's always a global object defined. In a web browser, when sc
- Code running in a {{domxref("Worker")}} has a {{domxref("WorkerGlobalScope")}} object as its global object.
- Scripts running under {{Glossary("Node.js")}} have an object called [`global`](https://nodejs.org/api/globals.html#globals_global) as their global object.

> **Note**: Unlike {{jsxref("Statements/var", "var")}}, the statements {{jsxref("Statements/let", "let")}} and {{jsxref("Statements/const", "const")}} do not create properties of the global object.
The [`globalThis`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis) global property allows one to access the global object regardless of the current environment.

## `window` object in the Browser
[`var`](/en-US/docs/Web/JavaScript/Reference/Statements/var) statements and [function declarations](/en-US/docs/Web/JavaScript/Reference/Statements/function) at the top level create properties of the global object. On the other hand, {{jsxref("Statements/let", "let")}} and {{jsxref("Statements/const", "const")}} declarations never create properties of the global object.

The `window` object is the Global Object in the Browser. Any Global Variables or Functions can be accessed as _properties_ of the `window` object.

### Access Global Variables

```js
var foo = "foobar";
foo === window.foo; // Returns: true
```

After defining a Global Variable `foo`, we can access its value directly from the `window` object, by using the variable name `foo` as a property name of the Global Object `window.foo`.

#### Explanation:

The global variable `foo` was stored in the `window` object, like this:

```js
foo: "foobar"
```

### Access Global Functions

```js
function greeting() {
console.log("Hi!");
}

window.greeting(); // It is the same as the normal invoking: greeting();
```

The example above explains how Global Functions are stored as _properties_ in the `window` object. We created a Global Function called `greeting`, then invoked it using the `window` object.

#### Explanation:

The global function `greeting` was stored in the `window` object, like this:

```js
greeting: function greeting() {
console.log("Hi!");
}
```
The properties of the global object are automatically added to the {{glossary("global scope")}}.

## See also

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/glossary/shadow_tree/index.md
Expand Up @@ -7,7 +7,7 @@ tags:
- Shadow Tree
- shadow DOM
---
A **shadow tree** is a tree of DOM {{Glossary("node", "nodes")}} whose topmost node is a **shadow root**; that is, the topmost node within a **shadow DOM**. A shadow tree is a hidden set of standard DOM nodes which is attached to a standard DOM node that serves as a host. The hidden nodes are not directly visible using regular DOM functionality, but require the use of a special [Shadow DOM API](/en-US/docs/Web/Web_Components/Using_shadow_DOM) to access.
A **shadow tree** is a tree of DOM [nodes](/en-US/docs/Glossary/Node/DOM) whose topmost node is a **shadow root**; that is, the topmost node within a **shadow DOM**. A shadow tree is a hidden set of standard DOM nodes which is attached to a standard DOM node that serves as a host. The hidden nodes are not directly visible using regular DOM functionality, but require the use of a special [Shadow DOM API](/en-US/docs/Web/Web_Components/Using_shadow_DOM) to access.

Nodes within the shadow tree are not affected by anything applied outside the shadow tree, and vice versa. This provides a way to encapsulate implementation details, which is especially useful for custom elements and other advanced design paradigms.

Expand Down
Expand Up @@ -55,7 +55,7 @@ You have been provided with some raw HTML/CSS and a few text strings and JavaScr
- Generates a silly story when the "Generate random story" button is pressed.
- Replaces the default name "Bob" in the story with a custom name, only if a custom name is entered into the "Enter custom name" text field before the generate button is pressed.
- Converts the default US weight and temperature quantities and units in the story into UK equivalents if the UK radio button is checked before the generate button is pressed.
- Generates a new random silly story everytime the button is pressed.
- Generates a new random silly story every time the button is pressed.

The following screenshot shows an example of what the finished program should output:

Expand Down
3 changes: 2 additions & 1 deletion files/en-us/learn/javascript/objects/basics/index.md
Expand Up @@ -177,7 +177,7 @@ person['name']['first']
This looks very similar to how you access the items in an array, and it is basically the same thing — instead of using an index number to select an item, you are using the name associated with each member's value.
It is no wonder that objects are sometimes called **associative arrays** — they map strings to values in the same way that arrays map numbers to values.

Dot notation is generally preferred over bracket notation because it is more succint and easier to read.
Dot notation is generally preferred over bracket notation because it is more succinct and easier to read.
However there are some cases where you have to use brackets.
For example, if an object property name is defined at runtime then you can't use dot notation to access the value, but you can pass the name as a variable inside brackets as shown with `input` below:

Expand All @@ -188,6 +188,7 @@ const person = {
}
const input = prompt('Get name or age?')
console.log(person[input])
```

## Setting object members

Expand Down
Expand Up @@ -118,14 +118,14 @@ To install Angular on your local system, you need the following:
You can use the Angular CLI to run commands in your terminal for generating, building, testing, and deploying Angular applications.
To install the Angular CLI, run the following command in your terminal:

```js
```bash
npm install -g @angular/cli
```

Angular CLI commands all start with `ng`, followed by what you'd like the CLI to do.
In the Desktop directory, use the following `ng new` command to create a new application called `todo`:

```js
```bash
ng new todo --routing=false --style=css
```

Expand All @@ -137,13 +137,13 @@ If you are prompted to enforce stricter type checking, you can respond with yes.

Navigate into your new project with the following `cd` command:

```js
```bash
cd todo
```

To run your `todo` application, use `ng serve`:

```js
```bash
ng serve
```

Expand Down
67 changes: 0 additions & 67 deletions files/en-us/mdn/about/index.md

This file was deleted.

39 changes: 0 additions & 39 deletions files/en-us/mdn/contribute/howto/create_and_edit_pages/index.md

This file was deleted.

0 comments on commit dcf483a

Please sign in to comment.