Skip to content

Commit

Permalink
Comment out ellipsis in code blocks (#18534)
Browse files Browse the repository at this point in the history
* Comment out ellipsis in code blocks

* Apply suggestions from code review

Co-authored-by: Jean-Yves Perrier <[email protected]>

Co-authored-by: Jean-Yves Perrier <[email protected]>
  • Loading branch information
OnkarRuikar and teoli2003 authored Jul 20, 2022
1 parent 3ce9575 commit 08495a2
Show file tree
Hide file tree
Showing 30 changed files with 60 additions and 58 deletions.
20 changes: 10 additions & 10 deletions files/en-us/web/api/webgl_multi_draw/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ and [`ext.multiDrawArraysInstancedWEBGL()`](/en-US/docs/Web/API/WEBGL_multi_draw

```js
// multiDrawArrays variant
// let firsts = new Int32Array(...);
// let counts = new Int32Array(...);
const firsts = new Int32Array(/**/);
const counts = new Int32Array(/**/);
ext.multiDrawArraysWEBGL(gl.TRIANGLES, firsts, 0, counts, 0, firsts.length);

// multiDrawArraysInstanced variant
// let firsts = new Int32Array(...);
// let counts = new Int32Array(...);
// let instanceCounts = new Int32Array(...);
const firsts = new Int32Array(/**/);
const counts = new Int32Array(/**/);
const instanceCounts = new Int32Array(/**/);
ext.multiDrawArraysInstancedWEBGL(
gl.TRIANGLES, firsts, 0, counts, 0, instanceCounts, 0, firsts.length);
```
Expand All @@ -108,14 +108,14 @@ Assumes that the indices which have been previously uploaded to the

```js
// multiDrawElements variant
// let counts = new Int32Array(...);
// let offsets = new Int32Array(...);
const counts = new Int32Array(/**/);
const offsets = new Int32Array(/**/);
ext.multiDrawElementsWEBGL(gl.TRIANGLES, counts, 0, gl.UNSIGNED_SHORT, offsets, 0, counts.length);

// multiDrawElementsInstanced variant
// let counts = new Int32Array(...);
// let offsets = new Int32Array(...);
// let instanceCounts = new Int32Array(...);
const counts = new Int32Array(/**/);
const offsets = new Int32Array(/**/);
const instanceCounts = new Int32Array(/**/);
ext.multiDrawElementsInstancedWEBGL(gl.TRIANGLES, counts, 0, gl.UNSIGNED_SHORT, offsets, 0, instanceCounts, 0, counts.length);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ None.
## Examples

```js
// let firsts = new Int32Array(...);
// let counts = new Int32Array(...);
const firsts = new Int32Array(/**/);
const counts = new Int32Array(/**/);
ext.multiDrawArraysWEBGL(gl.TRIANGLES, firsts, 0, counts, 0, firsts.length);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ None.
## Examples

```js
// let counts = new Int32Array(...);
// let offsets = new Int32Array(...);
// let instanceCounts = new Int32Array(...);
const counts = new Int32Array(/**/);
const offsets = new Int32Array(/**/);
const instanceCounts = new Int32Array(/**/);
ext.multiDrawElementsInstancedWEBGL(gl.TRIANGLES, counts, 0, gl.UNSIGNED_SHORT, offsets, 0, instanceCounts, 0, counts.length);
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ None.
## Examples

```js
// let counts = new Int32Array(...);
// let offsets = new Int32Array(...);
const counts = new Int32Array(/**/);
const offsets = new Int32Array(/**/);
ext.multiDrawElementsWEBGL(gl.TRIANGLES, counts, 0, gl.UNSIGNED_SHORT, offsets, 0, counts.length);
```

Expand Down
6 changes: 4 additions & 2 deletions files/en-us/web/api/webglvertexarrayobject/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ When working with `WebGLVertexArrayObject` objects, the following methods are us
var vao = gl.createVertexArray();
gl.bindVertexArray(vao);

// ...
//

// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO
// ...

//
```

## Specifications
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/webrtc_api/using_dtmf/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function gotStream(stream) {
}
} else {
log("Your browser doesn't support RTCPeerConnection.addTrack(). Falling " +
"back to the <strong>deprecated</strong> addStream() method...");
"back to the <strong>deprecated</strong> addStream() method");
callerPC.addStream(stream);
}

Expand Down Expand Up @@ -292,7 +292,7 @@ When the calling {{domxref("RTCPeerConnection")}} begins to receive media (after

```js
function handleCallerNegotiationNeeded() {
log("Negotiating...");
log("Negotiating");
callerPC.createOffer(offerOptions)
.then(function(offer) {
log("Setting caller's local description: " + offer.sdp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class WebSocket {
public static void main(String[] args) throws IOException, NoSuchAlgorithmException {
ServerSocket server = new ServerSocket(80);
try {
System.out.println("Server has started on 127.0.0.1:80.\r\nWaiting for a connection...");
System.out.println("Server has started on 127.0.0.1:80.\r\nWaiting for a connection");
Socket client = server.accept();
System.out.println("A client connected.");
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class Server {
TcpListener server = new TcpListener(IPAddress.Parse("127.0.0.1"), 80);

server.Start();
Console.WriteLine("Server has started on 127.0.0.1:80.{0}Waiting for a connection...", Environment.NewLine);
Console.WriteLine("Server has started on 127.0.0.1:80.{0}Waiting for a connection", Environment.NewLine);

TcpClient client = server.AcceptTcpClient();

Expand Down Expand Up @@ -244,7 +244,7 @@ class Server {
var server = new TcpListener(IPAddress.Parse(ip), port);

server.Start();
Console.WriteLine("Server has started on {0}:{1}, Waiting for a connection...", ip, port);
Console.WriteLine("Server has started on {0}:{1}, Waiting for a connection", ip, port);

TcpClient client = server.AcceptTcpClient();
Console.WriteLine("A client connected.");
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/webvr_api/using_the_webvr_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ Now onto our first WebVR-specific code. First of all, we check to see if {{domxr
console.log('WebVR 1.1 supported');
```
Inside our `if() { ... }` block, we run the {{domxref("Navigator.getVRDisplays()")}} function. This returns a promise, which is fulfilled with an array containing all the VR display devices connected to the computer. If none are connected, the array will be empty.
Inside our `if () { }` block, we run the {{domxref("Navigator.getVRDisplays()")}} function. This returns a promise, which is fulfilled with an array containing all the VR display devices connected to the computer. If none are connected, the array will be empty.
```js
// Then get the displays attached to the computer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function onRefSpaceCreated(refSpace) {
});

// Now set up matrices, create a secondary reference space to
// transform the viewer's pose, and so forth. Then...
// transform the viewer's pose, and so forth.

xrSession.requestAnimationFrame(onDrawFrame);
}
Expand Down
12 changes: 6 additions & 6 deletions files/en-us/web/api/webxr_device_api/performance/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,16 @@ Consider the following

```js
function drawScene(gl, view, programInfo, buffers, texture, deltaTime) {
// ...
//
for (object in scene) {
let vertexList = [/* ... */];
let vertexList = [/* */];
let normalMatrix = mat4.create();
let modelViewMatrix = mat4.create();
let objectMatrix = mat4.create();

// Apply rotation updates to the object if needed

mat4.rotate(/* ... */);
mat4.rotate(/* */);
}
}
```
Expand All @@ -72,14 +72,14 @@ This renders a scene. But it's inefficient, because it allocates as local variab
A simple change can optimize this significantly:

```js
const vertexList = [/* ... */];
const vertexList = [/* */];
const normalMatrix = mat4.create();
const modelViewMatrix = mat4.create();

function drawScene(gl, view, programInfo, buffers, texture, deltaTime) {
// ...
//
for (object in scene) {
// ...
//
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/webxr_device_api/rendering/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ For that reason, you need to use the timestamp provided to ensure your animation
let lastFrameTime = 0;

function drawFrame(time, frame) {
/* ... schedule next frame, prepare the buffer, etc ... */
// schedule next frame, prepare the buffer, etc.

const deltaTime = (time - lastFrameTime) * 0.001;
lastFrameTime = time;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ function myDrawFrame(currentFrameTime, frame) {
animationFrameRequestID = session.requestAnimationFrame(myDrawFrame);

if (viewerPose) {
/* ... render the frame ... */
// render the frame
}
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Other improvements include updating the emulator to rename the `XR` interface to

### Context requirements

A WebXR compatible environment starts with a securely-loaded document. Your document needs to either have been loaded from the local drive (such as by using a URL such as `http://localhost/...`), or using {{Glossary("HTTPS")}} when loading the page. The JavaScript code must, likewise, have been loaded securely.
A WebXR compatible environment starts with a securely-loaded document. Your document needs to either have been loaded from the local drive (such as by using a URL such as `http://localhost/`), or using {{Glossary("HTTPS")}} when loading the page. The JavaScript code must, likewise, have been loaded securely.

If the document wasn't loaded securely, you won't get very far. The {{domxref("navigator.xr")}} property doesn't even exist if the document wasn't loaded securely. This may also be the case if there is no compatible XR hardware available. Either way, you need to be prepared for the lack of an `xr` property and either gracefully handle the error or provide some form of fallback.

Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/window/opendialog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ to interact with the opener window until they close the modal dialog.
openDialog(url)
openDialog(url, name)
openDialog(url, name, features)
openDialog(url, name, features, arg0, arg1, /* ... ,*/ argN)
openDialog(url, name, features, arg0, arg1, /* ,*/ argN)
```

### Parameters
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/window/setimmediate/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ updates.
setImmediate(func)
setImmediate(func, param0)
setImmediate(func, param0, param1)
setImmediate(func, param0, param1, /* ... ,*/ paramN)
setImmediate(func, param0, param1, /* ,*/ paramN)
```

### Parameters

- `func`
- : The function you wish to call.

- `param0, ..., paramN`
- `param0`, …, `paramN`
- : All parameters will be passed directly to your function.

### Return value
Expand Down
3 changes: 2 additions & 1 deletion files/en-us/web/api/window/unhandledrejection_event/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ Many environments (such as {{Glossary("Node.js")}}) report unhandled promise rej

```js
window.addEventListener('unhandledrejection', function (event) {
// ...your code here to handle the unhandled rejection…
// code for handling the unhandled rejection
//

// Prevent the default handling (such as outputting the
// error to the console)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The **`importScripts()`** method of the {{domxref("WorkerGlobalScope")}} interfa
```js
importScripts(path0)
importScripts(path0, path1)
importScripts(path0, path1, /* ... ,*/ pathN)
importScripts(path0, path1, /* ,*/ pathN)
```

### Parameters
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/xrcompositionlayer/miplevels/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ let quadLayer = xrGLBinding.createQuadLayer({
width: 1.0,
height: 1.0,
mipLevels: 5,
transform : new XRRigidTransform({ /* ... */}),
transform : new XRRigidTransform({ /* */}),
});

quadLayer.mipLevels; // 5
Expand Down
3 changes: 1 addition & 2 deletions files/en-us/web/api/xrcompositionlayer/needsredraw/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ Use the `needsRedraw` property to check if a layer needs to be redrawn and then

```js
function onXRFrame(time, frame) {

/* ... */
//

if (quadLayer.needsRedraw) {
// redraw the layer
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/xrcylinderlayer/aspectratio/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const cylinderLayer = xrGlBinding.createCylinderLayer({
centralAngle : 60 * Math.PI / 180,
aspectRatio : 2,
radius : 2,
transform : new XRRigidTransform(/* ... */),
transform : new XRRigidTransform(/* */),
});

cylinderLayer.aspectRatio; // 2
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/xrcylinderlayer/centralangle/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const cylinderLayer = xrGlBinding.createCylinderLayer({
centralAngle : 60 * Math.PI / 180,
aspectRatio : 2,
radius : 2,
transform : new XRRigidTransform(/* ... */),
transform : new XRRigidTransform(/* */),
});

cylinderLayer.centralAngle; // 1.0471975511965976
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/xrcylinderlayer/radius/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const cylinderLayer = xrGlBinding.createCylinderLayer({
centralAngle : 60 * Math.PI / 180,
aspectRatio : 2,
radius : 2,
transform : new XRRigidTransform(/* ... */),
transform : new XRRigidTransform(/* */),
});

cylinderLayer.radius; // 2
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/xrinputsource/hand/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ An {{domxref("XRHand")}} object or {{jsxref("null")}} if the {{domxref("XRSessio
```js

navigator.xr.requestSession({optionalFeatures: ["hand-tracking"]}).then(
// ...
//
);

function renderFrame(session, frame) {
// ...
//

for (inputSource of session.inputSources) {
if (inputSource.hand) {
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/xrinputsource/targetraymode/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function updateInputSources(session, frame, refSpace) {
}
}

/* ... */
//
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion files/en-us/web/api/xrinputsource/targetrayspace/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ function updateInputSources(session, frame, refSpace) {
}
}

/* ... */
//
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/xrjointpose/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ Call {{domxref("XRFrame.getJointPose()")}} with an {{domxref("XRJointSpace")}} a

```js
navigator.xr.requestSession({optionalFeatures: ["hand-tracking"]}).then(
// ...
//
);

function renderFrame(session, frame) {
// ...
//

for (inputSource of session.inputSources) {
if (inputSource.hand) {
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/xrjointpose/radius/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ Call {{domxref("XRFrame.getJointPose()")}} with an {{domxref("XRJointSpace")}} a

```js
navigator.xr.requestSession({optionalFeatures: ["hand-tracking"]}).then(
// ...
//
);

function renderFrame(session, frame) {
// ...
//

for (inputSource of session.inputSources) {
if (inputSource.hand) {
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/xrjointspace/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ You can use an `XRJointSpace` object and an {{domxref("XRReferenceSpace")}} to g

```js
navigator.xr.requestSession({optionalFeatures: ["hand-tracking"]}).then(
// ...
//
);

function renderFrame(session, frame) {
// ...
//

for (inputSource of session.inputSources) {
if (inputSource.hand) {
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/xrjointspace/jointname/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ Given a `XRJointSpace`, the `jointName` property will contain the hand joint nam

```js
navigator.xr.requestSession({optionalFeatures: ["hand-tracking"]}).then(
// ...
//
);

function renderFrame(session, frame) {
// ...
//

for (inputSource of session.inputSources) {
if (inputSource.hand) {
Expand Down

0 comments on commit 08495a2

Please sign in to comment.