Skip to content
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

Fix inline styles in Web/API - x #5517

Merged
merged 15 commits into from
Jun 1, 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
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<dt><code>chrome</code></dt>
<dd>If on, the page is loaded as window's only content, without any of the browser's interface elements. There will be no context menu defined by default and none of the standard keyboard shortcuts will work. The page is supposed to provide a user interface of its own, usually this feature is used to open XUL documents (standard dialogs like the JavaScript Console are opened this way).</dd>
<dt><code>dialog</code></dt>
<dd><a href="menusystemcommands.png" title="MenuSystemCommands.png"><img class="internal lwrap" src="menusystemcommands.png" style="float: left;"> </a> The <code>dialog</code> feature removes all icons (restore, minimize, maximize) from the window's titlebar, leaving only the close button. Mozilla 1.2+ and Netscape 7.1 will render the other menu system commands (in FF 1.0 and in NS 7.0x, the command system menu is not identified with the Firefox/NS 7.0x icon on the left end of the titlebar: that's probably a bug. You can access the command system menu with a right-click on the titlebar). Dialog windows are windows which have no minimize system command icon and no maximize/restore down system command icon on the titlebar nor in correspondent menu item in the command system menu. They are said to be dialog because their normal, usual purpose is to only notify info and to be dismissed, closed. On Mac systems, dialog windows have a different window border and they may get turned into a sheet.</dd>
<dd><a href="menusystemcommands.png" title="MenuSystemCommands.png"><img class="internal lwrap" src="menusystemcommands.png"></a> The <code>dialog</code> feature removes all icons (restore, minimize, maximize) from the window's titlebar, leaving only the close button. Mozilla 1.2+ and Netscape 7.1 will render the other menu system commands (in FF 1.0 and in NS 7.0x, the command system menu is not identified with the Firefox/NS 7.0x icon on the left end of the titlebar: that's probably a bug. You can access the command system menu with a right-click on the titlebar). Dialog windows are windows which have no minimize system command icon and no maximize/restore down system command icon on the titlebar nor in correspondent menu item in the command system menu. They are said to be dialog because their normal, usual purpose is to only notify info and to be dismissed, closed. On Mac systems, dialog windows have a different window border and they may get turned into a sheet.</dd>
<dt><code>modal</code></dt>
<dd>If on, the new window is said to be modal. The user cannot return to the main window until the modal window is closed. A typical modal window is created by the <a href="/en-US/docs/Web/API/Window/alert">alert() function</a>.</dd>
<dd>The exact behavior of modal windows depends on the platform and on the Mozilla release version.
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/window/popstate_event/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ <h2 id="When_popstate_is_sent">When popstate is sent</h2>
<li>If the <strong>new-entry</strong> doesn't have persisted user state and its URL's fragment is non-<code>null</code>, the document is scrolled to that fragment.</li>
<li>Next, <strong>current-entry</strong> is set to <strong>new-entry</strong>. The destination entry is now considered to be current.</li>
<li>If <strong>new-entry</strong> has serialized state information saved with it, that information is deserialized into {{domxref("History.state")}}; otherwise, <code>state</code> is <code>null</code>.</li>
<li><span style="color: #229922;">If the value of <code>state</code> changed, the <code>popstate</code> event is sent to the document.</span></li>
<li>If the value of <code>state</code> changed, the <code>popstate</code> event is sent to the document.</li>
<li>Any persisted user state is restored, if the browser chooses to do so.</li>
<li>If the original and new entry's shared the same document, but had different fragments in their URLs, send the {{domxref("Window.hashchange_event", "hashchange")}} event to the window.</li>
</ol>
Expand Down
18 changes: 2 additions & 16 deletions files/en-us/web/api/window/screenleft/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,8 @@ <h2 id="Examples">Examples</h2>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table" style="height: 49px; width: 1000px;">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ SpecName('CSSOM View', '#dom-window-screenx', 'Window.screenLeft') }}</td>
<td>{{ Spec2('CSSOM View') }}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<p>{{Specifications}}</p>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note, fixed a few cases of style in spec table just by adding this macro (I tested it works).



<h2 id="Browser_compatibility">Browser compatibility</h2>

Expand Down
17 changes: 1 addition & 16 deletions files/en-us/web/api/window/screentop/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,7 @@ <h2 id="Examples">Examples</h2>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table" style="height: 49px; width: 1000px;">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ SpecName('CSSOM View', '#dom-window-screeny', 'Window.screenTop') }}</td>
<td>{{ Spec2('CSSOM View') }}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<p>{{Specifications}}</p>

<h2 id="Browser_compatibility">Browser compatibility</h2>

Expand Down
17 changes: 1 addition & 16 deletions files/en-us/web/api/window/screenx/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,22 +80,7 @@ <h2 id="Examples">Examples</h2>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table" style="height: 49px; width: 1000px;">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ SpecName('CSSOM View', '#dom-window-screenx', 'Window.screenX') }}</td>
<td>{{ Spec2('CSSOM View') }}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<p>{{Specifications}}</p>

<h2 id="Browser_compatibility">Browser compatibility</h2>

Expand Down
17 changes: 1 addition & 16 deletions files/en-us/web/api/window/screeny/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,7 @@ <h2 id="Examples">Examples</h2>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table" style="height: 49px; width: 1000px;">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ SpecName('CSSOM View', '#dom-window-screeny', 'Window.screenY') }}</td>
<td>{{ Spec2('CSSOM View') }}</td>
<td>Initial definition.</td>
</tr>
</tbody>
</table>
<p>{{Specifications}}</p>

<h2 id="Browser_compatibility">Browser compatibility</h2>

Expand Down
5 changes: 1 addition & 4 deletions files/en-us/web/api/window/scrollx/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ <h2 id="Example">Example</h2>

<h2 id="Notes">Notes</h2>

<p><span style="line-height: 1.572;">The </span><code
style="font-size: 14px;">pageXOffset</code><span style="line-height: 1.572;"> property
is an alias for the </span><code style="font-size: 14px;">scrollX</code><span
style="line-height: 1.572;"> property:</span></p>
<p>The <code>pageXOffset</code> property is an alias for the <code>scrollX</code> property:</p>

<pre>window.pageXOffset == window.scrollX; // always true</pre>

Expand Down
27 changes: 13 additions & 14 deletions files/en-us/web/api/window/setimmediate/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: Window.setImmediate()
slug: Web/API/Window/setImmediate
tags:
- API
- HTML DOM
- Method
- Non-standard
- Reference
- Window
- setImmediate
- Polyfill
- API
- HTML DOM
- Method
- Non-standard
- Reference
- Window
- setImmediate
- Polyfill
browser-compat: api.Window.setImmediate
---
<div>{{APIRef("HTML DOM")}}{{Non-standard_header}}</div>
Expand All @@ -21,7 +21,7 @@
<div class="note">This method is not expected to become standard, and is only implemented
by recent builds of Internet Explorer and Node.js 0.10+. It meets resistance both from
<a href="https://bugzilla.mozilla.org/show_bug.cgi?id=686201">Gecko</a> (Firefox) and <a
href="http://code.google.com/p/chromium/issues/detail?id=146172">Webkit</a>
href="https://code.google.com/p/chromium/issues/detail?id=146172">Webkit</a>
(Google/Apple).</div>

<h2 id="Syntax">Syntax</h2>
Expand All @@ -41,19 +41,18 @@ <h2 id="Syntax">Syntax</h2>
<h2 id="Notes">Notes</h2>

<p>The {{DOMxRef("Window.clearImmediate", "clearImmediate")}} method can be used to clear
the immediate actions, just like {{DOMxRef("Window.clearTimeout", "clearTimeout")}} for
{{DOMxRef("window.setTimeout", "setTimeout")}}.</p>
the immediate actions, just like {{DOMxRef("WindowOrWorkerGlobalScope/clearTimeout", "clearTimeout")}} for
{{DOMxRef("WindowOrWorkerGlobalScope/setTimeout", "setTimeout")}}.</p>

<p>This method can be used instead of the <code>setTimeout(fn, 0)</code> method to execute
<a
href="http://www.nczonline.net/blog/2009/08/11/timed-array-processing-in-javascript/">heavy
href="https://www.nczonline.net/blog/2009/08/11/timed-array-processing-in-javascript/">heavy
operations</a>. </p>

<p>The feature can be emulated in a few different ways:</p>

<ul>
<li><span style="line-height: 22px;">{{DOMxRef("Window.postMessage",
"postMessage")}} </span>can be used to trigger an immediate but yielding callback.
<li>{{DOMxRef("Window.postMessage", "postMessage")}} can be used to trigger an immediate but yielding callback.
Do note that Internet Explorer 8 includes a synchronous version of
<code>postMessage</code>, which means it cannot be used as a fallback.</li>
<li>{{DOMxRef("MessageChannel")}} can be used reliably inside of Web Workers whereas the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@
title: WindowOrWorkerGlobalScope.setInterval()
slug: Web/API/WindowOrWorkerGlobalScope/setInterval
tags:
- API
- Gecko
- HTML DOM
- Intervals
- JavaScript timers
- MakeBrowserAgnostic
- Method
- NeedsMarkupWork
- Timers
- WindowOrWorkerGlobalScope
- setInterval
- Polyfill
- API
- Gecko
- HTML DOM
- Intervals
- JavaScript timers
- MakeBrowserAgnostic
- Method
- NeedsMarkupWork
- Timers
- WindowOrWorkerGlobalScope
- setInterval
- Polyfill
browser-compat: api.WindowOrWorkerGlobalScope.setInterval
---
<div>{{APIRef("HTML DOM")}}</div>
Expand Down Expand Up @@ -41,7 +41,7 @@ <h3 id="Parameters">Parameters</h3>
<dt><code>code</code></dt>
<dd>An optional syntax allows you to include a string instead of a function, which is
compiled and executed every <code>delay</code> milliseconds. This syntax is <em>not
recommended</em> for the same reasons that make using {{jsxref("eval", "eval()")}} a
recommended</em> for the same reasons that make using {{jsxref("Global_Objects/eval", "eval()")}} a
security risk.</dd>
<dt><code>delay</code>{{optional_inline}}</dt>
<dd>The time, in milliseconds (thousandths of a second), the timer should delay in
Expand All @@ -56,7 +56,7 @@ <h3 id="Parameters">Parameters</h3>
<p><strong>Note</strong>: Passing additional arguments to <code>setInterval()</code> in
the first syntax does not work in Internet Explorer 9 and earlier. If you want to
enable this functionality on that browser, you must use a polyfill (see the <a
href="#Callback_arguments">Callback arguments</a> section).</p>
href="#callback_arguments">Callback arguments</a> section).</p>
</div>

<h3 id="Return_value">Return value</h3>
Expand Down Expand Up @@ -139,7 +139,7 @@ <h3 id="Example_2_Alternating_two_colors">Example 2: Alternating two colors</h3>
<h3 id="Example_3_Typewriter_simulation">Example 3: Typewriter simulation</h3>

<p>The following example simulates typewriter by first clearing and then slowly
typing content into the <a href="/en-US/docs/DOM/NodeList"><code>NodeList</code></a>
typing content into the <a href="/en-US/docs/Web/API/NodeList"><code>NodeList</code></a>
that matches a specified group of selectors.</p>

<pre class="brush:html">&lt;!DOCTYPE html&gt;
Expand Down Expand Up @@ -300,7 +300,7 @@ <h3 id="Example_3_Typewriter_simulation">Example 3: Typewriter simulation</h3>
&lt;/html&gt;</pre>

<p><a href="/files/3997/typewriter.html">View this demo in action</a>. See also: <a
href="/en-US/docs/DOM/window.clearInterval"><code>clearInterval()</code></a>.</p>
href="/en-US/docs/Web/API/WindowOrWorkerGlobalScope/clearInterval"><code>clearInterval()</code></a>.</p>

<h2 id="Callback_arguments">Callback arguments</h2>

Expand Down Expand Up @@ -366,15 +366,14 @@ <h2 id="Callback_arguments">Callback arguments</h2>
<p>Starting in Gecko 5.0 {{geckoRelease("5.0")}}, intervals are clamped to fire no more
often than once per second in inactive tabs.</p>

<h2 id="The_this_problem">The "<a
href="/en-US/docs/Web/JavaScript/Reference/Operators/this"><code>this</code></a>"
problem</h2>

<h2 id="The_this_problem">The "this" problem</h2>

<p>When you pass a method to <code>setInterval()</code> or any other function, it is
invoked with the wrong <a
href="/en-US/docs/Web/JavaScript/Reference/Operators/this"><code>this</code></a>
value. This problem is explained in detail in the <a
href="/en-US/docs/Web/JavaScript/Reference/Operators/this#As_an_object_method">JavaScript
href="/en-US/docs/Web/JavaScript/Reference/Operators/this#as_an_object_method">JavaScript
reference</a>.</p>

<h3 id="Explanation">Explanation</h3>
Expand Down Expand Up @@ -414,7 +413,7 @@ <h3 id="A_possible_solution">A possible solution</h3>
<p>A possible way to solve the "<code>this</code>" problem is to replace the two native
<code>setTimeout()</code> or <code>setInterval()</code> global functions with two
<em>non-native</em> ones that enable their invocation through the <a
href="/en-US/docs/JavaScript/Reference/Global_Objects/Function/call"><code>Function.prototype.call</code></a>
href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/call"><code>Function.prototype.call</code></a>
method. The following example shows a possible replacement:</p>

<pre class="brush:js">// Enable the passage of the 'this' object through the JavaScript timers
Expand All @@ -438,7 +437,7 @@ <h3 id="A_possible_solution">A possible solution</h3>
<div class="note">These two replacements also enable the HTML5 standard passage of
arbitrary arguments to the callback functions of timers in IE. So they can be used as
<em>non-standard-compliant</em> polyfills also. See the <a
href="#Callback_arguments">callback arguments paragraph</a> for a
href="#callback_arguments">callback arguments paragraph</a> for a
<em>standard-compliant</em> polyfill.</div>

<p>New feature test:</p>
Expand Down Expand Up @@ -482,17 +481,6 @@ <h2 id="MiniDaemon_-_A_framework_for_managing_timers">MiniDaemon - A framework f
problem</a> for details). The following code is also <a
href="https://github.com/madmurphy/minidaemon.js">available on GitHub</a>.</p>

<div class="note">For a more complex but still modular version of it
(<code><em>Daemon</em></code>) see <a
href="/en-US/Add-ons/Code_snippets/Timers/Daemons">JavaScript Daemons Management</a>.
This more complex version is nothing but a big and scalable collection of methods for
the <code><em>Daemon</em></code> constructor. However, the <code><em>Daemon</em></code>
constructor itself is nothing but a clone of <code><em>MiniDaemon</em></code> with an
added support for <em>init</em> and <em>onstart</em> functions declarable during the
instantiation of the <code><em>daemon</em></code>. <strong>So the
<code><em>MiniDaemon</em></code> framework remains the recommended way for simple
animations</strong>, because <code><em>Daemon</em></code> without its collection of
methods is essentially a clone of it.</div>

<h3 id="minidaemon.js">minidaemon.js</h3>

Expand Down Expand Up @@ -597,7 +585,7 @@ <h4 id="Arguments">Arguments</h4>
arguments</strong>: <em>index</em> (the iterative index of each invocation),
<em>length</em> (the number of total invocations assigned to the <em>daemon</em> -
finite or <a
href="/en-US/docs/JavaScript/Reference/Global_Objects/Infinity"><code>Infinity</code></a>)
href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity"><code>Infinity</code></a>)
and <em>backwards</em> (a boolean expressing whether the <em>index</em> is increasing
or decreasing). It is something like <em>callback</em>.call(<em>thisObject</em>,
<em>index</em>, <em>length</em>, <em>backwards</em>). <strong>If the callback function
Expand All @@ -624,7 +612,7 @@ <h4 id="MiniDaemon_instances_properties"><code>MiniDaemon</code> instances prope
<dd>The function that is repeatedly invoked (read/write). It is called with three
arguments: <em>index</em> (the iterative index of each invocation), <em>length</em>
(the number of total invocations assigned to the daemon - finite or <a
href="/en-US/docs/JavaScript/Reference/Global_Objects/Infinity"><code>Infinity</code></a>)
href="/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity"><code>Infinity</code></a>)
and backwards (a boolean expressing whether the <em>index</em> is decreasing or not) –
see above. If the <code>myDaemon.task</code> function returns a <code>false</code>
value the <em>daemon</em> is paused.</dd>
Expand Down Expand Up @@ -792,15 +780,8 @@ <h2 id="See_also">See also</h2>

<ul>
<li>A polyfill of <code>setInterval</code> which allows passing arguments to the callback is available in <a href="https://github.com/zloirock/core-js#settimeout-and-setinterval"><code>core-js</code></a></li>
<li><a href="/en-US/Add-ons/Code_snippets/Timers">JavaScript timers</a></li>
<li>{{domxref("WindowOrWorkerGlobalScope.setTimeout")}}</li>
<li>{{domxref("WindowOrWorkerGlobalScope.clearTimeout")}}</li>
<li>{{domxref("WindowOrWorkerGlobalScope.clearInterval")}}</li>
<li>{{domxref("window.requestAnimationFrame")}}</li>
<li><a href="/en-US/Add-ons/Code_snippets/Timers/Daemons"><em>Daemons</em>
management</a></li>
</ul>

<div id="gtx-trans" style="position: absolute; left: 164px; top: 272px;">
<div class="gtx-trans-icon"></div>
</div>
2 changes: 1 addition & 1 deletion files/en-us/web/api/xdomainrequest/timeout/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

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

<pre style="font-size: 14px;">xdr.timeout = milliseconds;</pre>
<pre class="brush: js">xdr.timeout = milliseconds;</pre>

<p>The default value is 0.</p>

Expand Down
6 changes: 2 additions & 4 deletions files/en-us/web/api/xmldocument/load/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,18 @@
---
<p>{{APIRef("DOM")}}{{Non-standard_Header}}{{Deprecated_Header}}</p>

<p><code>document.load()</code> is a part of an old version of the W3C <a href="https://www.w3.org/TR/2003/WD-DOM-Level-3-LS-20030619/load-save.html#LS-DocumentLS">DOM Level 3 Load &amp; Save module</a>. Can be used with {{DOMxRef("document.async")}} to indicate whether the request is synchronous or asynchronous (the default). As of at least Gecko 1.9, this no longer supports cross-site loading of documents (Use {{DOMxRef("XMLHttpRequest")}} or {{DOMxRef("WindowOrWorkerGlobalScope.fetch", "fetch()")}} instead).</p>
<p><code>document.load()</code> is a part of an old version of the W3C <a href="https://www.w3.org/TR/2003/WD-DOM-Level-3-LS-20030619/load-save.html#LS-DocumentLS">DOM Level 3 Load &amp; Save module</a>. Can be used with {{DOMxRef("XMLDocument.async")}} to indicate whether the request is synchronous or asynchronous (the default). As of at least Gecko 1.9, this no longer supports cross-site loading of documents (Use {{DOMxRef("XMLHttpRequest")}} or {{DOMxRef("WindowOrWorkerGlobalScope.fetch", "fetch()")}} instead).</p>

<h2 id="Examples">Examples</h2>

<div style="overflow: hidden;">
<pre>var xmlDoc = document.implementation.createDocument("", "test", null);
<pre class="brush: js">var xmlDoc = document.implementation.createDocument("", "test", null);

function documentLoaded (e) {
alert(new XMLSerializer().serializeToString(e.target)); // Gives querydata.xml contents as string
}

xmlDoc.addEventListener("load", documentLoaded, false);
xmlDoc.load('querydata.xml');</pre>
</div>

<p>{{Source("content/xml/tests/load/", "See also the load sample")}} in the XML tests directory. (To test this functionality, create the files on your local disk or on a webserver rather than loading the load.html file from the LXR-generated page, which will serve the text.xml file as HTML.)</p>

Expand Down
Loading