Skip to content
Open
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
4 changes: 2 additions & 2 deletions src/core/p5.Graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ class Graphics {
* Removes the graphics buffer from the web page.
*
* Calling `myGraphics.remove()` removes the graphics buffer's
* `<canvas>` element from the web page. The graphics buffer also uses
* `<canvas>` element from the web page. The graphics buffer also uses
* a bit of memory on the CPU that can be freed like so:
*
* ```js
Expand Down Expand Up @@ -597,7 +597,7 @@ function graphics(p5, fn){
* @param {Number} h height height of the graphics buffer in pixels.
* @param {(P2D|WEBGL|P2DHDR)} renderer the renderer to use, either P2D or WEBGL.
* @param {p5} [pInst] sketch instance.
* @param {HTMLCanvasElement} [canvas] existing `&lt;canvas&gt;` element to use.
* @param {HTMLCanvasElement} [canvas] existing `<canvas>` element to use.
*
* @example
* let pg;
Expand Down
4 changes: 2 additions & 2 deletions src/core/rendering.js
Original file line number Diff line number Diff line change
Expand Up @@ -607,9 +607,9 @@ function rendering(p5, fn){

/**
* A system variable that provides direct access to the sketch's
* `&lt;canvas&gt;` element.
* `<canvas>` element.
*
* The `&lt;canvas&gt;` element provides many specialized features that aren't
* The `<canvas>` element provides many specialized features that aren't
* included in the p5.js library. The `drawingContext` system variable
* provides access to these features by exposing the sketch's
* <a href="https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D">CanvasRenderingContext2D</a>
Expand Down
52 changes: 26 additions & 26 deletions src/dom/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,16 +371,16 @@ function dom(p5, fn){
}

/**
* Creates a `&lt;div&gt;&lt;/div&gt;` element.
* Creates a `<div></div>` element.
*
* `&lt;div&gt;&lt;/div&gt;` elements are commonly used as containers for
* `<div></div>` elements are commonly used as containers for
* other elements.
*
* The parameter `html` is optional. It accepts a string that sets the
* inner HTML of the new `&lt;div&gt;&lt;/div&gt;`.
* inner HTML of the new `<div></div>`.
*
* @method createDiv
* @param {String} [html] inner HTML for the new `&lt;div&gt;&lt;/div&gt;` element.
* @param {String} [html] inner HTML for the new `<div></div>` element.
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
*
* @example
Expand Down Expand Up @@ -418,13 +418,13 @@ function dom(p5, fn){
/**
* Creates a paragraph element.
*
* `&lt;p&gt;&lt;/p&gt;` elements are commonly used for paragraph-length text.
* `<p></p>` elements are commonly used for paragraph-length text.
*
* The parameter `html` is optional. It accepts a string that sets the
* inner HTML of the new `&lt;p&gt;&lt;/p&gt;`.
* inner HTML of the new `<p></p>`.
*
* @method createP
* @param {String} [html] inner HTML for the new `&lt;p&gt;&lt;/p&gt;` element.
* @param {String} [html] inner HTML for the new `<p></p>` element.
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
*
* @example
Expand All @@ -447,18 +447,18 @@ function dom(p5, fn){
};

/**
* Creates a `&lt;span&gt;&lt;/span&gt;` element.
* Creates a `<span></span>` element.
*
* `&lt;span&gt;&lt;/span&gt;` elements are commonly used as containers
* for inline elements. For example, a `&lt;span&gt;&lt;/span&gt;`
* `<span></span>` elements are commonly used as containers
* for inline elements. For example, a `<span></span>`
* can hold part of a sentence that's a
* <span style="color: deeppink;">different</span> style.
*
* The parameter `html` is optional. It accepts a string that sets the
* inner HTML of the new `&lt;span&gt;&lt;/span&gt;`.
* inner HTML of the new `<span></span>`.
*
* @method createSpan
* @param {String} [html] inner HTML for the new `&lt;span&gt;&lt;/span&gt;` element.
* @param {String} [html] inner HTML for the new `<span></span>` element.
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
*
* @example
Expand Down Expand Up @@ -511,7 +511,7 @@ function dom(p5, fn){
};

/**
* Creates an `&lt;img&gt;` element that can appear outside of the canvas.
* Creates an `<img>` element that can appear outside of the canvas.
*
* The first parameter, `src`, is a string with the path to the image file.
* `src` should be a relative path, as in `'assets/image.png'`, or a URL, as
Expand Down Expand Up @@ -582,7 +582,7 @@ function dom(p5, fn){
};

/**
* Creates an `&lt;a&gt;&lt;/a&gt;` element that links to another web page.
* Creates an `<a></a>` element that links to another web page.
*
* The first parmeter, `href`, is a string that sets the URL of the linked
* page.
Expand Down Expand Up @@ -639,7 +639,7 @@ function dom(p5, fn){

/* INPUT */
/**
* Creates a slider `&lt;input&gt;&lt;/input&gt;` element.
* Creates a slider `<input></input>` element.
*
* Range sliders are useful for quickly selecting numbers from a given range.
*
Expand Down Expand Up @@ -761,7 +761,7 @@ function dom(p5, fn){
};

/**
* Creates a `&lt;button&gt;&lt;/button&gt;` element.
* Creates a `<button></button>` element.
*
* The first parameter, `label`, is a string that sets the label displayed on
* the button.
Expand Down Expand Up @@ -838,7 +838,7 @@ function dom(p5, fn){
};

/**
* Creates a checkbox `&lt;input&gt;&lt;/input&gt;` element.
* Creates a checkbox `<input></input>` element.
*
* Checkboxes extend the <a href="#/p5.Element">p5.Element</a> class with a
* `checked()` method. Calling `myBox.checked()` returns `true` if it the box
Expand Down Expand Up @@ -979,11 +979,11 @@ function dom(p5, fn){
};

/**
* Creates a dropdown menu `&lt;select&gt;&lt;/select&gt;` element.
* Creates a dropdown menu `<select></select>` element.
*
* The parameter is optional. If `true` is passed, as in
* `let mySelect = createSelect(true)`, then the dropdown will support
* multiple selections. If an existing `&lt;select&gt;&lt;/select&gt;` element
* multiple selections. If an existing `<select></select>` element
* is passed, as in `let mySelect = createSelect(otherSelect)`, the existing
* element will be wrapped in a new <a href="#/p5.Element">p5.Element</a>
* object.
Expand Down Expand Up @@ -1250,8 +1250,8 @@ function dom(p5, fn){
*
* The parameter is optional. If a string is passed, as in
* `let myRadio = createSelect('food')`, then each radio option will
* have `"food"` as its `name` parameter: `&lt;input name="food"&gt;&lt;/input&gt;`.
* If an existing `&lt;div&gt;&lt;/div&gt;` or `&lt;span&gt;&lt;/span&gt;`
* have `"food"` as its `name` parameter: `<input name="food"></input>`.
* If an existing `<div></div>` or `<span></span>`
* element is passed, as in `let myRadio = createSelect(container)`, it will
* become the radio button's parent element.
*
Expand All @@ -1264,8 +1264,8 @@ function dom(p5, fn){
* - `myRadio.disable(shouldDisable)` enables the entire radio button if `true` is passed and disables it if `false` is passed.
*
* @method createRadio
* @param {Object} [containerElement] container HTML Element, either a `&lt;div&gt;&lt;/div&gt;`
* or `&lt;span&gt;&lt;/span&gt;`.
* @param {Object} [containerElement] container HTML Element, either a `<div></div>`
* or `<span></span>`.
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
*
* @example
Expand Down Expand Up @@ -1384,7 +1384,7 @@ function dom(p5, fn){
*/
/**
* @method createRadio
* @param {String} [name] name parameter assigned to each option's `&lt;input&gt;&lt;/input&gt;` element.
* @param {String} [name] name parameter assigned to each option's `<input></input>` element.
* @return {p5.Element} new <a href="#/p5.Element">p5.Element</a> object.
*/
/**
Expand Down Expand Up @@ -1651,7 +1651,7 @@ function dom(p5, fn){
};

/**
* Creates a text `&lt;input&gt;&lt;/input&gt;` element.
* Creates a text `<input></input>` element.
*
* Call `myInput.size()` to set the length of the text box.
*
Expand Down Expand Up @@ -1727,7 +1727,7 @@ function dom(p5, fn){
};

/**
* Creates an `&lt;input&gt;&lt;/input&gt;` element of type `'file'`.
* Creates an `<input></input>` element of type `'file'`.
*
* `createFileInput()` allows users to select local files for use in a sketch.
* It returns a <a href="#/p5.File">p5.File</a> object.
Expand Down
4 changes: 2 additions & 2 deletions src/dom/p5.Element.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ class Element {
/**
* Attaches the element to a parent element.
*
* For example, a `&lt;div&gt;&lt;/div&gt;` element may be used as a box to
* For example, a `<div></div>` element may be used as a box to
* hold two pieces of text, a header and a paragraph. The
* `&lt;div&gt;&lt;/div&gt;` is the parent element of both the header and
* `<div></div>` is the parent element of both the header and
* paragraph.
*
* The parameter `parent` can have one of three types. `parent` can be a
Expand Down
6 changes: 3 additions & 3 deletions src/dom/p5.MediaElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ function media(p5, fn){
}

/**
* Creates a `&lt;video&gt;` element for simple audio/video playback.
* Creates a `<video>` element for simple audio/video playback.
*
* `createVideo()` returns a new
* <a href="#/p5.MediaElement">p5.MediaElement</a> object. Videos are shown by
Expand Down Expand Up @@ -1407,7 +1407,7 @@ function media(p5, fn){
/* AUDIO STUFF */

/**
* Creates a hidden `&lt;audio&gt;` element for simple audio playback.
* Creates a hidden `<audio>` element for simple audio playback.
*
* `createAudio()` returns a new
* <a href="#/p5.MediaElement">p5.MediaElement</a> object.
Expand Down Expand Up @@ -1484,7 +1484,7 @@ function media(p5, fn){
}

/**
* Creates a `&lt;video&gt;` element that "captures" the audio/video stream from
* Creates a `<video>` element that "captures" the audio/video stream from
* the webcam and microphone.
*
* `createCapture()` returns a new
Expand Down
2 changes: 1 addition & 1 deletion src/io/files.js
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,7 @@ function files(p5, fn){
* (<a href="https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction" target="_blank">XML</a>)
* is a standard format for sending data between applications. Like HTML, the
* XML format is based on tags and attributes, as in
* `&lt;time units="s"&gt;1234&lt;/time&gt;`.
* `<time units="s">1234</time>`.
*
* The first parameter, `path`, is always a string with the path to the file.
* Paths to local files should be relative, as in
Expand Down
16 changes: 8 additions & 8 deletions src/io/p5.XML.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class XML {
* Returns the element's name as a `String`.
*
* An XML element's name is given by its tag. For example, the element
* `&lt;language&gt;JavaScript&lt;/language&gt;` has the name `language`.
* `<language>JavaScript</language>` has the name `language`.
*
* @return {String} name of the element.
*
Expand Down Expand Up @@ -105,11 +105,11 @@ class XML {
* Sets the element's tag name.
*
* An XML element's name is given by its tag. For example, the element
* `&lt;language&gt;JavaScript&lt;/language&gt;` has the name `language`.
* `<language>JavaScript</language>` has the name `language`.
*
* The parameter, `name`, is the element's new name as a string. For example,
* calling `myXML.setName('planet')` will make the element's new tag name
* `&lt;planet&gt;&lt;/planet&gt;`.
* `<planet></planet>`.
*
* @param {String} name new tag name of the element.
*
Expand Down Expand Up @@ -251,7 +251,7 @@ class XML {
*
* The parameter, `name`, is optional. If a string is passed, as in
* `myXML.getChildren('cat')`, then the method will only return child elements
* with the tag `&lt;cat&gt;`.
* with the tag `<cat>`.
*
* @param {String} [name] name of the elements to return.
* @return {p5.XML[]} child elements.
Expand Down Expand Up @@ -345,7 +345,7 @@ class XML {
*
* The parameter, `name`, is optional. If a string is passed, as in
* `myXML.getChild('cat')`, then the first child element with the tag
* `&lt;cat&gt;` will be returned. If a number is passed, as in
* `<cat>` will be returned. If a number is passed, as in
* `myXML.getChild(1)`, then the child element at that index will be returned.
*
* @param {String|Integer} name element name or index.
Expand Down Expand Up @@ -480,7 +480,7 @@ class XML {
*
* The parameter, `name`, is the child element to remove. If a string is
* passed, as in `myXML.removeChild('cat')`, then the first child element
* with the tag `&lt;cat&gt;` will be removed. If a number is passed, as in
* with the tag `<cat>` will be removed. If a number is passed, as in
* `myXML.removeChild(1)`, then the child element at that index will be
* removed.
*
Expand Down Expand Up @@ -1034,7 +1034,7 @@ class XML {
* Sets the element's content.
*
* An element's content is the text between its tags. For example, the element
* `&lt;language&gt;JavaScript&lt;/language&gt;` has the content `JavaScript`.
* `<language>JavaScript</language>` has the content `JavaScript`.
*
* The parameter, `content`, is a string with the element's new content.
*
Expand Down Expand Up @@ -1152,7 +1152,7 @@ function xml(p5, fn){
* (<a href="https://developer.mozilla.org/en-US/docs/Web/XML/XML_introduction" target="_blank">XML</a>)
* is a standard format for sending data between applications. Like HTML, the
* XML format is based on tags and attributes, as in
* `&lt;time units="s"&gt;1234&lt;/time&gt;`.
* `<time units="s">1234</time>`.
*
* Note: Use <a href="#/p5/loadXML">loadXML()</a> to load external XML files.
*
Expand Down
Loading