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

Put Comma at the right Place #2950

Merged
merged 3 commits into from
Mar 8, 2021
Merged
Show file tree
Hide file tree
Changes from 2 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 @@ -178,7 +178,7 @@ <h2 id="HTML_layout_elements_in_more_detail">HTML layout elements in more detail
<li>{{HTMLElement('footer')}} represents a group of end content for a page.</li>
</ul>

<p>Each of the aformentioned elements can be clicked on to read the corresponding article in the "HTML element reference" section, providing more detail about each one.</p>
<p>Each of the aforementioned elements can be clicked on to read the corresponding article in the "HTML element reference" section, providing more detail about each one.</p>

<h3 id="Non-semantic_wrappers">Non-semantic wrappers</h3>

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/window/getcomputedstyle/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<h2 id="Syntax">Syntax</h2>

<pre
class="brush: js">var <var>style</var> = window.getComputedStyle(<var>element</var> [, <var>pseudoElt</var>]);</pre>
class="brush: js">var <var>style</var> = window.getComputedStyle(<var>element</var>, [<var>pseudoElt</var>]);</pre>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @CreaTorAlexander
We're now expanding out the blocks as per https://developer.mozilla.org/en-US/docs/MDN/Structures/Syntax_sections , so I made that change.

FWIW though this was incorrect. The [ ] block indicates what is optional - which should include the comma. What this says is that this is a valid format window.getComputedStyle(<var>element</var>,);, when what you mean is window.getComputedStyle(element, pseudoEl);

https://developer.mozilla.org/en-US/docs/MDN/Structures/Syntax_sections

Copy link
Contributor Author

@CreaTorAlexander CreaTorAlexander Mar 9, 2021

Choose a reason for hiding this comment

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

Good to know, this means that we now start to use this

slice();
slice(param1);

everywhere?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes. That's the intent.


<dl>
<dt><code><var>element</var></code></dt>
Expand Down