Skip to content

Remove summary and seoSummary classes from JS docs #4085

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 2 commits into from
Apr 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion files/en-us/web/javascript/eventloop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
---
<div>{{JsSidebar("Advanced")}}</div>

<p><span class="seoSummary">JavaScript has a concurrency model based on an <strong>event loop</strong>, which is responsible for executing the code, collecting and processing events, and executing queued sub-tasks.</span> This model is quite different from models in other languages like C and Java.</p>
<p>JavaScript has a concurrency model based on an <strong>event loop</strong>, which is responsible for executing the code, collecting and processing events, and executing queued sub-tasks. This model is quite different from models in other languages like C and Java.</p>

<h2 id="Runtime_concepts">Runtime concepts</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
---
<div>{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Using_promises", "Web/JavaScript/Guide/Meta_programming")}}</div>

<p class="summary">Processing each of the items in a collection is a very common operation. JavaScript provides a number of ways of iterating over a collection, from simple {{jsxref("Statements/for","for")}} loops to {{jsxref("Global_Objects/Array/map","map()")}} and {{jsxref("Global_Objects/Array/filter","filter()")}}.</p>

<p class="summary"><span class="seoSummary">Iterators and Generators bring the concept of iteration directly into the core language and provide a mechanism for customizing the behavior of {{jsxref("Statements/for...of","for...of")}} loops.</span></p>
<p>Iterators and Generators bring the concept of iteration directly into the core language and provide a mechanism for customizing the behavior of {{jsxref("Statements/for...of","for...of")}} loops.</p>

<p>For details, see also:</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
---
<div>{{jsSidebar("JavaScript Guide")}} {{PreviousNext("Web/JavaScript/Guide/Expressions_and_Operators", "Web/JavaScript/Guide/Text_formatting")}}</div>

<p><span class="seoSummary">This chapter introduces the concepts, objects and functions used to work with and perform calculations using numbers and dates in JavaScript.</span> This includes using numbers written in various bases including decimal, binary, and hexadecimal, as well as the use of the global {{jsxref("Math")}} object to perform a wide variety of mathematical operations on numbers.</p>
<p>This chapter introduces the concepts, objects and functions used to work with and perform calculations using numbers and dates in JavaScript. This includes using numbers written in various bases including decimal, binary, and hexadecimal, as well as the use of the global {{jsxref("Math")}} object to perform a wide variety of mathematical operations on numbers.</p>

<h2 id="Numbers">Numbers</h2>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/javascript/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
---
<div>{{JsSidebar}}</div>

<p class="summary"><span class="seoSummary"><strong>JavaScript</strong> (<strong>JS</strong>) is a lightweight, interpreted, or <a href="https://en.wikipedia.org/wiki/Just-in-time_compilation">just-in-time</a> compiled programming language with {{Glossary("First-class Function", "first-class functions")}}. While it is most well-known as the scripting language for Web pages, <a href="https://en.wikipedia.org/wiki/JavaScript#Other_usage">many non-browser environments</a> also use it, such as {{Glossary("Node.js")}}, <a href="https://couchdb.apache.org/">Apache CouchDB</a> and <a href="http://www.adobe.com/devnet/acrobat/javascript.html">Adobe Acrobat</a>.</span> JavaScript is a {{Glossary("Prototype-based programming", "prototype-based")}}, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more <a href="/en-US/docs/Web/JavaScript/About_JavaScript">about JavaScript</a>.</p>
<p><strong>JavaScript</strong> (<strong>JS</strong>) is a lightweight, interpreted, or <a href="https://en.wikipedia.org/wiki/Just-in-time_compilation">just-in-time</a> compiled programming language with {{Glossary("First-class Function", "first-class functions")}}. While it is most well-known as the scripting language for Web pages, <a href="https://en.wikipedia.org/wiki/JavaScript#Other_usage">many non-browser environments</a> also use it, such as {{Glossary("Node.js")}}, <a href="https://couchdb.apache.org/">Apache CouchDB</a> and <a href="http://www.adobe.com/devnet/acrobat/javascript.html">Adobe Acrobat</a>. JavaScript is a {{Glossary("Prototype-based programming", "prototype-based")}}, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles. Read more <a href="/en-US/docs/Web/JavaScript/About_JavaScript">about JavaScript</a>.</p>

<p>This section is dedicated to the JavaScript language itself, and not the parts that are specific to Web pages or other host environments. For information about {{Glossary("API","API")}} specifics to Web pages, please see <a href="/en-US/docs/Web/API">Web APIs</a> and {{Glossary("DOM")}}.</p>

Expand Down
10 changes: 6 additions & 4 deletions files/en-us/web/javascript/reference/classes/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,14 @@
---
<div>{{jsSidebar("Classes")}}</div>

<p><span class="seoSummary">The <code><strong>static</strong></code> keyword defines a
<p>The <code><strong>static</strong></code> keyword defines a
static method or property for a class. Neither static methods nor static properties
can be called on instances of the class. Instead, they're called on the class
itself.</span> Static methods are often utility functions, such as functions to create
or clone objects, whereas static properties are useful for caches, fixed-configuration,
or any other data you don't need to be replicated across instances.</p>
itself.</p>

<p>Static methods are often utility functions, such as functions to create
or clone objects, whereas static properties are useful for caches, fixed-configuration,
or any other data you don't need to be replicated across instances.</p>

<div>{{EmbedInteractiveExample("pages/js/classes-static.html")}}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">Creates a JavaScript <strong><code>Date</code></strong>
<p>Creates a JavaScript <strong><code>Date</code></strong>
instance that represents a single moment in time in a platform-independent
format.</span> <code>Date</code> objects contain a <code>Number</code> that represents
format.<code>Date</code> objects contain a <code>Number</code> that represents
milliseconds since 1 January 1970 UTC.</p>

<div>{{EmbedInteractiveExample("pages/js/date-constructor.html")}}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <strong><code>getDay()</code></strong> method returns the
<p>The <strong><code>getDay()</code></strong> method returns the
day of the week for the specified date according to local time, where 0 represents
Sunday.</span> For the day of the month, see {{jsxref("Date.prototype.getDate()")}}.
</p>
Sunday. For the day of the month, see {{jsxref("Date.prototype.getDate()")}}.</p>

<div>{{EmbedInteractiveExample("pages/js/date-getday.html", "shorter")}}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">JavaScript <strong><code>Date</code></strong> objects represent a single moment in time in a platform-independent format.</span> <code>Date</code> objects contain a <code>Number</code> that represents milliseconds since 1 January 1970 UTC.</p>
<p>JavaScript <strong><code>Date</code></strong> objects represent a single moment in time in a platform-independent format. <code>Date</code> objects contain a <code>Number</code> that represents milliseconds since 1 January 1970 UTC.</p>

<div class="notecard note">
<p>TC39 is working on <a href="https://tc39.es/proposal-temporal/docs/index.html">Temporal</a>, a new Date/Time API. Read more about it on the <a href="https://blogs.igalia.com/compilers/2020/06/23/dates-and-times-in-javascript/">Igalia blog</a>. It is not yet ready for production use!</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <strong><code>Map</code></strong> object holds key-value
pairs and remembers the original insertion order of the keys.</span> Any value (both
<p>The <strong><code>Map</code></strong> object holds key-value
pairs and remembers the original insertion order of the keys. Any value (both
objects and {{glossary("Primitive", "primitive values")}}) may be used as either a key
or a value.</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,75 +9,9 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <strong><code>Math.abs()</code></strong> function returns
the absolute value of a number</span>, that is</p>

<p><math display="block">
<semantics>
<mrow>
<mstyle mathvariant="monospace">
<mrow>
<mo lspace="0em" rspace="thinmathspace">Math.abs</mo>
<mo stretchy="false">(</mo>
<mi>x</mi>
<mo stretchy="false">)</mo>
</mrow>
</mstyle>
<mo>=</mo>
<mrow>
<mo stretchy="false">|</mo>
<mi>x</mi>
<mo stretchy="false">|</mo>
</mrow>
<mo>=</mo>
<mrow>
<mo>{</mo>
<mtable columnalign="left left">
<mtr>
<mtd>
<mi>x</mi>
</mtd>
<mtd>
<mtext>if</mtext>
<mspace width="1em"></mspace>
<mi>x</mi>
<mo>&gt;</mo>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mi>0</mi>
</mtd>
<mtd>
<mtext>if</mtext>
<mspace width="1em"></mspace>
<mi>x</mi>
<mo>=</mo>
<mn>0</mn>
</mtd>
</mtr>
<mtr>
<mtd>
<mo>-</mo>
<mi>x</mi>
</mtd>
<mtd>
<mtext>if</mtext>
<mspace width="1em"></mspace>
<mi>x</mi>
<mo>&lt;</mo>
<mn>0</mn>
</mtd>
</mtr>
</mtable>
</mrow>
</mrow>
<annotation encoding="TeX">{\mathtt{\operatorname{Math.abs}(z)}} = {|z|} =
\begin{cases} x &amp; \text{if} \quad x \geq 0 \\ x &amp; \text{if} \quad x &lt; 0
\end{cases} </annotation>
</semantics>
</math></p>
<p>The <strong><code>Math.abs()</code></strong> function returns
the absolute value of a number. That is, it returns <code>x</code> if <code>x</code>
is positive or zero, and the negation of <code>x</code> if <code>x</code> is negative.</p>

<div>{{EmbedInteractiveExample("pages/js/math-abs.html")}}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,35 +13,9 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <strong><code>Math.cos()</code></strong> static function
<p>The <strong><code>Math.cos()</code></strong> static function
returns the {{interwiki("wikipedia", "cosine")}} of the specified angle, which must be
specified in {{interwiki("wikipedia", "radians")}}. This value is </span><math
style="display: inline;">
<mstyle displaystyle="true">
<mfrac>
<msub>
<mrow>
<mtext>length</mtext>
</mrow>
<mrow>
<mrow>
<mtext>adjacent</mtext>
</mrow>
</mrow>
</msub>
<msub>
<mrow>
<mtext>length</mtext>
</mrow>
<mrow>
<mrow>
<mtext>hypotenuse</mtext>
</mrow>
</mrow>
</msub>
</mfrac>
</mstyle>
</math>.</p>
specified in {{interwiki("wikipedia", "radians")}}.</p>

<div>{{EmbedInteractiveExample("pages/js/math-cos.html")}}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <strong><code>Number.isFinite()</code></strong> method
<p>The <strong><code>Number.isFinite()</code></strong> method
determines whether the passed value is a finite number — that is, it checks that the
type of a given value is {{jsxref("Number")}}, and the number is neither positive
{{jsxref("Infinity")}}, negative <code>Infinity</code>, nor {{jsxref("NaN")}}.</span>
</p>
{{jsxref("Infinity")}}, negative <code>Infinity</code>, nor {{jsxref("NaN")}}.</p>

<div>{{EmbedInteractiveExample("pages/js/number-isfinite.html")}}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <code><strong>RangeError</strong></code> object indicates an error when a value is not in the set or range of allowed values.</span></p>
<p>The <code><strong>RangeError</strong></code> object indicates an error when a value is not in the set or range of allowed values.</p>

<h2 id="Description">Description</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,8 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <code><strong>RangeError()</strong></code> constructor
creates an error when a value is not in the set or range of allowed values.</span>
</p>
<p>The <code><strong>RangeError()</strong></code> constructor creates an error
when a value is not in the set or range of allowed values.</p>

<h2 id="Syntax">Syntax</h2>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The static
<p>The static
<strong><code>Reflect.preventExtensions()</code></strong> method prevents new
properties from ever being added to an object (i.e., prevents future extensions to the
object).</span> It is similar to {{jsxref("Object.preventExtensions()")}}, but with
object). It is similar to {{jsxref("Object.preventExtensions()")}}, but with
some <a href="#difference_from_object.preventExtensions">differences</a>.</p>

<div>{{EmbedInteractiveExample("pages/js/reflect-preventextensions.html")}}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The static
<p>The static
<strong><code>Reflect.setPrototypeOf()</code></strong> method is the same method as
{{jsxref("Object.setPrototypeOf()")}}, except for its return type. It sets the
prototype (i.e., the internal <code>[[Prototype]]</code> property) of a specified
object to another object or to {{jsxref("null")}}, and returns <code>true</code> if
the operation was successful, or <code>false</code> otherwise</span>.</p>
the operation was successful, or <code>false</code> otherwise.</p>

<div>{{EmbedInteractiveExample("pages/js/reflect-setprototypeof.html")}}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <strong><code>padStart()</code></strong> method pads the
<p>The <strong><code>padStart()</code></strong> method pads the
current string with another string (multiple times, if needed) until the resulting
string reaches the given length.</span> The padding is applied from the start of the
string reaches the given length. The padding is applied from the start of the
current string.</p>

<div>{{EmbedInteractiveExample("pages/js/string-padstart.html")}}</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The static <strong><code>String.raw()</code></strong> method
<p>The static <strong><code>String.raw()</code></strong> method
is a tag function of <a
href="/en-US/docs/Web/JavaScript/Reference/template_strings">template literals</a>.
This is <em>similar</em> to the <code>r</code> prefix in Python, or the <code>@</code>
prefix in C# for string literals. (But it is not <em>identical</em>; see explanations
in <a href="https://bugs.chromium.org/p/v8/issues/detail?id=5016">this issue</a>.)
It's used to get the raw string form of template literals, that is, substitutions (e.g.
<code>${foo}</code>) are processed, but escapes (e.g. <code>\n</code>) are not.</span>
</p>
<code>${foo}</code>) are processed, but escapes (e.g. <code>\n</code>) are not.</p>

<div>{{EmbedInteractiveExample("pages/js/string-raw.html")}}</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <strong><code>replace()</code></strong> method returns a
<p>The <strong><code>replace()</code></strong> method returns a
new string with some or all matches of a <code>pattern</code> replaced by a
<code>replacement</code>.</span> The <code>pattern</code> can be a string or a
<code>replacement</code>. The <code>pattern</code> can be a string or a
{{jsxref("RegExp")}}, and the <code>replacement</code> can be a string or a function to
be called for each match. If <code>pattern</code> is a string, only the first occurrence
will be replaced.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
---
<div>{{JSRef}}</div>

<p><span class="seoSummary">The <strong><code>replaceAll()</code></strong> method returns
<p>The <strong><code>replaceAll()</code></strong> method returns
a new string with all matches of a <code>pattern</code> replaced by a
<code>replacement</code>.</span> The <code>pattern</code> can be a string or a
<code>replacement</code>. The <code>pattern</code> can be a string or a
{{jsxref("RegExp")}}, and the <code>replacement</code> can be a string or a function to
be called for each match.</p>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
---
<div>{{jsSidebar("Operators")}}</div>

<p><span class="seoSummary">The <strong>conditional (ternary) operator</strong> is the
<p>The <strong>conditional (ternary) operator</strong> is the
only JavaScript operator that takes three operands: a condition followed by a
question mark (<code>?</code>), then an expression to execute if the condition is
{{Glossary("truthy")}} followed by a colon (<code>:</code>), and finally the
expression to execute if the condition is {{Glossary("falsy")}}.</span> This
expression to execute if the condition is {{Glossary("falsy")}}. This
operator is frequently used as a shortcut for the <a
href="/en-US/docs/Web/JavaScript/Reference/Statements/if...else"><code>if</code></a>
statement.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
<div>{{JSSidebar("Operators")}}</div>

<p>The <strong>optional chaining</strong> operator (<strong><code>?.</code></strong>)
permits reading the value of a property located deep within a chain of connected objects
without having to expressly validate that each reference in the chain is valid. <span
class="seoSummary">The <code>?.</code> operator functions similarly to the
enables you to read the value of a property located deep within a chain of connected objects
without having to check that each reference in the chain is valid.</p>

<p>The <code>?.</code> operator is like the
<code>.</code> chaining operator, except that instead of causing an error if a
reference is <a href="/en-US/docs/Glossary/Nullish">nullish</a> ({{JSxRef("null")}} or
{{JSxRef("undefined")}}), the expression short-circuits with a return value of
<code>undefined</code>.</span> When used with function calls, it returns
<code>undefined</code>. When used with function calls, it returns
<code>undefined</code> if the given function does not exist.</p>

<p>This results in shorter and simpler expressions when accessing chained properties when
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@
---
<div>{{jsSidebar("Statements")}}</div>

<p><span class="seoSummary">An async function is a function declared with the <code>async</code> keyword, and the <code>await</code> keyword is permitted within them. The <code>async</code> and <code>await</code> keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains.</span>
</p>
<p>An async function is a function declared with the <code>async</code> keyword, and the <code>await</code> keyword is permitted within them. The <code>async</code> and <code>await</code> keywords enable asynchronous, promise-based behavior to be written in a cleaner style, avoiding the need to explicitly configure promise chains.</p>

<p>Async functions may also be defined {{jsxref("Operators/async_function", "as
expressions", "", 1)}}.</p>
Expand Down
Loading