Skip to content

Commit

Permalink
fix: autoformat with prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni committed Feb 26, 2023
1 parent 925fd4e commit 3f502c7
Show file tree
Hide file tree
Showing 8 changed files with 28 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,14 @@ from {{domxref("Document.timeline")}} by that amount:

```js
const offsetTimeline = new DocumentTimeline({ originTime: 500 });
console.log(
document.timeline.currentTime - offsetTimeline.currentTime
); // 500
console.log(document.timeline.currentTime - offsetTimeline.currentTime); // 500
```

A {{domxref("DocumentTimeline")}} relative to the current moment can be constructed with:

```js
const nowTimeline = new DocumentTimeline({
originTime: document.timeline.currentTime
originTime: document.timeline.currentTime,
});
console.log(nowTimeline.currentTime); // 0
```
Expand Down
1 change: 1 addition & 0 deletions files/en-us/web/api/documenttype/name/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ slug: Web/API/DocumentType/name
page-type: web-api-instance-property
browser-compat: api.DocumentType.name
---

{{APIRef("DOM")}}

The read-only **`name`** property of the {{domxref("DocumentType")}} returns the type of the document.
Expand Down
7 changes: 6 additions & 1 deletion files/en-us/web/api/documenttype/publicid/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ slug: Web/API/DocumentType/publicId
page-type: web-api-instance-property
browser-compat: api.DocumentType.publicId
---

{{APIRef("DOM")}}

The read-only **`publicId`** property of the {{domxref("DocumentType")}} returns a formal identifier of the document.
Expand All @@ -19,7 +20,11 @@ A string.
## Examples

```js
const docType = document.implementation.createDocumentType("svg", "-//W3C//DTD SVG 1.1//EN", "http://www.w3.org/2000/svg");
const docType = document.implementation.createDocumentType(
"svg",
"-//W3C//DTD SVG 1.1//EN",
"http://www.w3.org/2000/svg"
);

console.log(docType.publicId); // Displays "-//W3C//DTD SVG 1.1//EN"
```
Expand Down
7 changes: 6 additions & 1 deletion files/en-us/web/api/documenttype/systemid/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ slug: Web/API/DocumentType/systemId
page-type: web-api-instance-property
browser-compat: api.DocumentType.systemId
---

{{APIRef("DOM")}}

The read-only **`systemId`** property of the {{domxref("DocumentType")}} returns the URL of the associated DTD.
Expand All @@ -19,7 +20,11 @@ A string.
## Examples

```js
const docType = document.implementation.createDocumentType("svg", "", "http://www.w3.org/2000/svg");
const docType = document.implementation.createDocumentType(
"svg",
"",
"http://www.w3.org/2000/svg"
);

console.log(docType.publicId); // Displays "http://www.w3.org/2000/svg"
```
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/element/gesturestart_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ It is a proprietary event specific to WebKit.
Use the event name in methods like {{domxref("EventTarget.addEventListener", "addEventListener()")}}, or set an event handler property.

```js
addEventListener('gesturestart', (event) => {});
addEventListener("gesturestart", (event) => {});

ongesturestart = (event) => {};
```
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fullscreen_api/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: Web/API/Fullscreen_API/Guide
page-type: guide
browser-compat:
- api.Document.fullscreenEnabled
- api.Document.fullscreen
- api.Document.fullscreen
---

{{DefaultAPISidebar("Fullscreen API")}}
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/fullscreen_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ browser-compat:
- api.Document.fullscreenEnabled
- api.Document.exitFullscreen
- api.Element.requestFullscreen
- api.Document.fullscreen
- api.Document.fullscreen
---

{{DefaultAPISidebar("Fullscreen API")}}
Expand Down
20 changes: 10 additions & 10 deletions files/en-us/web/css/@media/prefers-color-scheme/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,14 +63,14 @@ Theme A (brown) uses a light color scheme by default, but will switch to a dark

```css
.theme-a {
background: #dca;
color: #731;
background: #dca;
color: #731;
}
@media (prefers-color-scheme: dark) {
.theme-a.adaptive {
background: #753;
color: #dcb;
outline: 5px dashed #000;
background: #753;
color: #dcb;
outline: 5px dashed #000;
}
}
```
Expand All @@ -79,14 +79,14 @@ Theme B (blue) uses a dark color scheme by default, but will switch to a light s

```css
.theme-b {
background: #447;
color: #bbd;
background: #447;
color: #bbd;
}
@media (prefers-color-scheme: light) {
.theme-b.adaptive {
background: #bcd;
color: #334;
outline: 5px dotted #000;
background: #bcd;
color: #334;
outline: 5px dotted #000;
}
}
```
Expand Down

0 comments on commit 3f502c7

Please sign in to comment.