Members
(constant) colorpalette
The color palette used by wplace.live
Methods
addBr(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a br to the overlay.
This br element will have properties shared between all br elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.11
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <br> elements have a shared class (e.g. {'className': 'bar'})
overlay.addbr({'id': 'foo'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<br id="foo" class="bar">
</body>
addButton(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a button to the overlay.
This button element will have properties shared between all button elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.12
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <button> elements have a shared class (e.g. {'className': 'bar'})
overlay.addButton({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<button id="foo" class="bar">Foobar.</button>
</body>
addButtonHelp(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a help button to the overlay. It will have a "?" icon unless overridden in callback.
On click, the button will attempt to output the title to the output element (ID defined in Overlay constructor).
This button element will have properties shared between all button elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.12
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Examples
// Assume all help button elements have a shared class (e.g. {'className': 'bar'})
overlay.addButtonHelp({'id': 'foo', 'title': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<button id="foo" class="bar" title="Help: Foobar.">?</button>
</body>
// Assume all help button elements have a shared class (e.g. {'className': 'bar'})
overlay.addButtonHelp({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<button id="foo" class="bar" title="Help: Foobar.">?</button>
</body>
addCaption(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a table caption to the overlay.
This caption element will have properties shared between all caption elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <caption> elements have a shared class (e.g. {'className': 'bar'})
overlay.addCaption({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<caption id="foo" class="bar">Foobar.</caption>
</body>
addCheckbox(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a checkbox to the overlay. This checkbox element will have properties shared between all checkbox elements in the overlay. You can override the shared properties by using a callback. Note: the checkbox element is inside a label element.
- Since:
- 0.43.10
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the checkbox that are NOT shared between all overlay checkbox elements. These should be camelCase. |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the checkbox. |
Example
// Assume all checkbox elements have a shared class (e.g. {'className': 'bar'})
overlay.addCheckbox({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<label>
<input type="checkbox" id="foo" class="bar">
"Foobar."
</label>
</body>
addDetails(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a details to the overlay.
This details element will have properties shared between all details elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.96
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <details> elements have a shared class (e.g. {'className': 'bar'})
overlay.addDetails({'id': 'foo'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<details id="foo" class="bar"></details>
</body>
addDiv(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a div to the overlay.
This div element will have properties shared between all div elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.2
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <div> elements have a shared class (e.g. {'className': 'bar'})
overlay.addDiv({'id': 'foo'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<div id="foo" class="bar"></div>
</body>
addDragbar(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a dragbar div element to the overlay.
This dragbar element will have properties shared between all dragbar elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.145
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the dragbar that are NOT shared between all overlay dragbars. These should be camelCase. |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the dragbar. |
Example
// Assume all dragbar elements have a shared class (e.g. {'className': 'bar'})
overlay.addDragbar({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<div id="foo" class="bar">Foobar.</div>
</body>
addFieldset(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a fieldset to the overlay.
This fieldset element will have properties shared between all fieldset elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.246
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <fieldset> elements have a shared class (e.g. {'className': 'bar'})
overlay.addFieldset({'id': 'foo'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<fieldset id="foo" class="bar"></fieldset>
</body>
addForm(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a form to the overlay.
This form element will have properties shared between all form elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.246
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <form> elements have a shared class (e.g. {'className': 'bar'})
overlay.addForm({'id': 'foo'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<form id="foo" class="bar"></form>
</body>
addHeader(level, additionalPropertiesopt, callbackopt) → {Overlay}
Adds a header to the overlay. This header element will have properties shared between all header elements in the overlay. You can override the shared properties by using a callback.
- Since:
- 0.43.7
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
level |
number
|
The header level. Must be between 1 and 6 (inclusive) |
||
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the header that are NOT shared between all overlay header elements. These should be camelCase. |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the header. |
Example
// Assume all header elements have a shared class (e.g. {'className': 'bar'})
overlay.addHeader(6, {'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<h6 id="foo" class="bar">Foobar.</h6>
</body>
addHr(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a hr to the overlay.
This hr element will have properties shared between all hr elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.7
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <hr> elements have a shared class (e.g. {'className': 'bar'})
overlay.addhr({'id': 'foo'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<hr id="foo" class="bar">
</body>
addImg(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a img to the overlay.
This img element will have properties shared between all img elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.2
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <img> elements have a shared class (e.g. {'className': 'bar'})
overlay.addimg({'id': 'foo', 'src': './img.png'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<img id="foo" src="./img.png" class="bar">
</body>
addInput(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a input to the overlay.
This input element will have properties shared between all input elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.13
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <input> elements have a shared class (e.g. {'className': 'bar'})
overlay.addInput({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<input id="foo" class="bar">Foobar.</input>
</body>
addInputFile(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a file input to the overlay with enhanced visibility controls. This input element will have properties shared between all file input elements in the overlay. Uses multiple hiding methods to prevent browser native text from appearing during minimize/maximize. You can override the shared properties by using a callback.
- Since:
- 0.43.17
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the file input that are NOT shared between all overlay file input elements. These should be camelCase. |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the file input. |
Example
// Assume all file input elements have a shared class (e.g. {'className': 'bar'})
overlay.addInputFile({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<div>
<input type="file" id="foo" class="bar" style="display: none"></input>
<button>Foobar.</button>
</div>
</body>
addLegend(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a legend to the overlay.
This legend element will have properties shared between all legend elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.246
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <legend> elements have a shared class (e.g. {'className': 'bar'})
overlay.addLegend({'id': 'foo', textContent: 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<legend id="foo" class="bar">
"Foobar."
</legend>
</body>
addLi(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a list item to the overlay.
This li element will have properties shared between all li elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <li> elements have a shared class (e.g. {'className': 'bar'})
overlay.addLi({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<li id="foo" class="bar">Foobar.</li>
</body>
addMenu(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a menu to the overlay.
This menu element will have properties shared between all menu elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <menu> elements have a shared class (e.g. {'className': 'bar'})
overlay.addMenu({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<menu id="foo" class="bar">Foobar.</menu>
</body>
addOl(additionalPropertiesopt, callbackopt) → {Overlay}
Adds an ordered list to the overlay.
This ol element will have properties shared between all ol elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <ol> elements have a shared class (e.g. {'className': 'bar'})
overlay.addOl({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<ol id="foo" class="bar">Foobar.</ol>
</body>
addOption(additionalPropertiesopt, callbackopt) → {Overlay}
Adds an option to the overlay.
This option element will have properties shared between all option elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.244
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <option> elements have a shared class (e.g. {'className': 'bar'})
overlay.addOption({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<option id="foo" class="bar">Foobar.</option>
</body>
addP(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a p to the overlay.
This p element will have properties shared between all p elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.2
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <p> elements have a shared class (e.g. {'className': 'bar'})
overlay.addP({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<p id="foo" class="bar">Foobar.</p>
</body>
addSelect(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a label & select element to the overlay. This select element will have properties shared between all select elements in the overlay. You can override the shared properties by using a callback.
- Since:
- 0.88.243
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the checkbox that are NOT shared between all overlay select elements. These should be camelCase. |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the label/select elements. |
Example
// Assume all select elements have a shared class (e.g. {'className': 'bar'})
overlay.addSelect({'id': 'foo', 'textContent': 'Foobar: '}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<label for="foo">
"Foobar: "
</label>
<select id="foo" class="bar"></select>
</body>
addSmall(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a small to the overlay.
This small element will have properties shared between all small elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.55.8
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <small> elements have a shared class (e.g. {'className': 'bar'})
overlay.addSmall({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<small id="foo" class="bar">Foobar.</small>
</body>
addSpan(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a span to the overlay.
This span element will have properties shared between all span elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.55.8
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <span> elements have a shared class (e.g. {'className': 'bar'})
overlay.addSpan({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<span id="foo" class="bar">Foobar.</span>
</body>
addSummary(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a summary to the overlay.
This summary element will have properties shared between all summary elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.96
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <summary> elements have a shared class (e.g. {'className': 'bar'})
overlay.addSummary({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<summary id="foo" class="bar">Foobar.</summary>
</body>
addTable(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a table to the overlay.
This table element will have properties shared between all table elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <table> elements have a shared class (e.g. {'className': 'bar'})
overlay.addTable({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<table id="foo" class="bar">Foobar.</table>
</body>
addTbody(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a table body to the overlay.
This tbody element will have properties shared between all tbody elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <tbody> elements have a shared class (e.g. {'className': 'bar'})
overlay.addTbody({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<tbody id="foo" class="bar">Foobar.</tbody>
</body>
addTd(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a table data cell to the overlay.
This td element will have properties shared between all td elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <td> elements have a shared class (e.g. {'className': 'bar'})
overlay.addTd({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<td id="foo" class="bar">Foobar.</td>
</body>
addTextarea(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a textarea to the overlay.
This textarea element will have properties shared between all textarea elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.43.13
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <textarea> elements have a shared class (e.g. {'className': 'bar'})
overlay.addTextarea({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<textarea id="foo" class="bar">Foobar.</textarea>
</body>
addTfoot(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a table footer to the overlay.
This tfoot element will have properties shared between all tfoot elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <tfoot> elements have a shared class (e.g. {'className': 'bar'})
overlay.addTfoot({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<tfoot id="foo" class="bar">Foobar.</tfoot>
</body>
addTh(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a table header (label) cell to the overlay.
This th element will have properties shared between all th elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <th> elements have a shared class (e.g. {'className': 'bar'})
overlay.addTh({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<th id="foo" class="bar">Foobar.</th>
</body>
addThead(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a table header to the overlay.
This thead element will have properties shared between all thead elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <thead> elements have a shared class (e.g. {'className': 'bar'})
overlay.addThead({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<thead id="foo" class="bar">Foobar.</thead>
</body>
addTimer(endDateopt, updateIntervalopt, additionalPropertiesopt, callbackopt) → {Overlay}
Adds a timer time element to the overlay.
This timer will countdown until it reaches the end date that was passed in.
Additionally, you can update the end date by changing the endDate dataset attribute on the element.
Timer elements are not localized. Output is HH:MM:SS with no units.
This timer will have properties shared between all timers in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.313
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
endDate |
Date
|
<optional> |
Date.now() |
The time to count down to. |
updateInterval |
number
|
<optional> |
500 |
The time in milliseconds to update the display of the timer. Default is 500 milliseconds. |
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the timer that are NOT shared between all overlay timers. These should be camelCase. |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the timer. |
Example
// Assume all timers have a shared class (e.g. {'className': 'bar'})
overlay.addTimer(Date.now() + 2211632704000, 500, {'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<time id="bm-timer-dh8fhw80" class="bar" datetime="PT27H34M56S" data-end-date="1771749296000">27:34:56</div>
</body>
addTr(additionalPropertiesopt, callbackopt) → {Overlay}
Adds a table row to the overlay.
This tr element will have properties shared between all tr elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <tr> elements have a shared class (e.g. {'className': 'bar'})
overlay.addTr({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<tr id="foo" class="bar">Foobar.</tr>
</body>
addUl(additionalPropertiesopt, callbackopt) → {Overlay}
Adds an unordered list to the overlay.
This ul element will have properties shared between all ul elements in the overlay.
You can override the shared properties by using a callback.
- Since:
- 0.88.180
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
additionalProperties |
Object.<string, any>
|
<optional> |
{} |
The DOM properties of the |
callback |
function
|
<optional> |
()=>{} |
Additional JS modification to the |
Example
// Assume all <ul> elements have a shared class (e.g. {'className': 'bar'})
overlay.addUl({'id': 'foo', 'textContent': 'Foobar.'}).buildOverlay(document.body);
// Output:
// (Assume <body> already exists in the webpage)
<body>
<ul id="foo" class="bar">Foobar.</ul>
</body>
base64ToUint8(base64) → {Uint8Array}
Decodes a base 64 encoded Uint8 array using the browser's built-in ASCII to binary function
Parameters:
| Name | Type | Description |
|---|---|---|
base64 |
Uint8Array
|
The base 64 encoded Uint8Array to convert |
Returns:
- Type:
-
Uint8Array
The decoded Uint8Array
buildElement() → {Overlay}
Finishes building an element. Call this after you are finished adding children. If the element will have no children, call it anyways.
- Since:
- 0.43.2
- Source:
Example
overlay
.addDiv()
.addHeader(1).buildElement() // Breaks out of the <h1>
.addP().buildElement() // Breaks out of the <p>
.buildElement() // Breaks out of the <div>
.addHr() // Since there are no more elements, calling buildElement() is optional
.buildOverlay(document.body);
buildHighlight()
Builds the highlight section of the window. This should be overriden by SettingsManager
- Since:
- 0.91.11
- Source:
buildHighlight()
Builds the "highlight" category of the settings window
- Since:
- 0.91.18
- Source:
- See:
-
- WindowSettings#buildHighlight
buildOverlay(parent)
Finishes building the overlay and displays it. Call this when you are done chaining methods.
- Since:
- 0.43.2
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
parent |
HTMLElement
|
The parent HTMLElement this overlay should be appended to as a child. |
Example
overlay
.addDiv()
.addP().buildElement()
.buildElement()
.buildOverlay(document.body); // Adds DOM structure to document body
// <div><p></p></div>
buildTemplate()
Builds the template section of the window. This should be overriden by SettingsManager
- Since:
- 0.91.68
- Source:
buildTemplate()
Build the "template" category of settings window
- Since:
- 0.91.68
- Source:
- See:
-
- WindowSettings#buildTemplate
buildWindow()
Creates the main Blue Marble window. Parent/child relationships in the DOM structure below are indicated by indentation.
- Since:
- 0.58.3
- Source:
buildWindow()
Spawns a Color Filter window. If another color filter window already exists, we DON'T spawn another! Parent/child relationships in the DOM structure below are indicated by indentation.
- Since:
- 0.88.149
- Source:
(async) buildWindow()
Spawns a telemetry window. If another telemetry window already exists, we DON'T spawn another! Parent/child relationships in the DOM structure below are indicated by indentation.
- Since:
- 0.88.339
- Source:
buildWindow()
Spawns a Template Wizard window. If another template wizard window already exists, we DON'T spawn another! Parent/child relationships in the DOM structure below are indicated by indentation.
- Since:
- 0.88.434
- Source:
buildWindow()
Spawns a Credits window. If another credits window already exists, we DON'T spawn another! Parent/child relationships in the DOM structure below are indicated by indentation.
- Since:
- 0.90.9
- Source:
buildWindow()
Spawns a Settings window. If another settings window already exists, we DON'T spawn another! Parent/child relationships in the DOM structure below are indicated by indentation.
- Since:
- 0.91.11
- Source:
buildWindowed()
Spawns a windowed Color Filter window. If another color filter window already exists, we DON'T spawn another! Parent/child relationships in the DOM structure below are indicated by indentation.
- Since:
- 0.90.35
- Source:
calculateCanvasTransparency(param) → {boolean}
Detects if the canvas is transparent.
- Since:
- 0.91.75
- Source:
Parameters:
| Name | Type | Description | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
param |
Object
|
Object that contains the parameters for the function
|
Returns:
- Type:
-
boolean
Is the canvas transparent? If transparent, then true is returned. Otherwise, false.
calculateCoordsFromChunked()
Calculates top left coordinate of template.
It uses Template.chunked to update Template.coords
- Since:
- 0.88.504
- Source:
calculateRelativeLuminance(array) → {Number}
Calcualtes the relative luminance of an RGB value
Parameters:
| Name | Type | Description |
|---|---|---|
array |
Array.<Number, Number, Number>
|
The RGB values as an array |
Returns:
- Type:
-
Number
The relative luminance as a Number
colorpaletteForBlueMarble()
Processes the palette used for Blue Marble. Each ID is sorted from smallest to largest. Color ID's are integers, which can be negative. Custom colors have been added for the Blue Marble purposes. Wplace palette colors have not been modified.
consoleError(…args)
Bypasses terser's stripping of console function calls.
This is so the non-obfuscated code will contain debugging console calls, but the distributed version won't.
However, the distributed version needs to call the console somehow, so this wrapper function is how.
This is the same as console.error().
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
args |
any
|
<repeatable> |
Arguments to be passed into the |
consoleLog(…args)
Bypasses terser's stripping of console function calls.
This is so the non-obfuscated code will contain debugging console calls, but the distributed version won't.
However, the distributed version needs to call the console somehow, so this wrapper function is how.
This is the same as console.log().
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
args |
any
|
<repeatable> |
Arguments to be passed into the |
consoleWarn(…args)
Bypasses terser's stripping of console function calls.
This is so the non-obfuscated code will contain debugging console calls, but the distributed version won't.
However, the distributed version needs to call the console somehow, so this wrapper function is how.
This is the same as console.warn().
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
args |
any
|
<repeatable> |
Arguments to be passed into the |
(async) convertTemplateToBlob() → {Promise.<Blob>}
Converts a Template class instance into a Blob.
Specifically, this takes Template.chunked and converts it to a Blob.
- Since:
- 0.88.504
- Source:
Returns:
- Type:
-
Promise.<Blob>
A Promise of a Blob PNG image of the template
createConfetti(parentElement)
Immedently creates confetti inside the parent element.
- Since:
- 0.88.356
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
parentElement |
HTMLElement
|
The parent element to create confetti inside of |
(async) createJSON() → {Object}
Creates the JSON object to store templates in
- Since:
- 0.65.4
- Source:
Returns:
- Type:
-
Object
The JSON object
createObserverBody(target) → {Observers}
Creates the MutationObserver for document.body
- Since:
- 0.43.2
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
target |
HTMLElement
|
Targeted element to watch |
(async) createTemplate(blob, name, coords)
Creates the template from the inputed file blob
- Since:
- 0.65.77
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
blob |
File
|
The file blob to create a template from |
name |
string
|
The display name of the template |
coords |
Array.<number, number, number, number>
|
The coordinates of the top left corner of the template |
(async) createTemplateTiles(tileSize, paletteBM, shouldSkipTransTiles, shouldAggSkipTransTiles) → {Object}
Creates chunks of the template for each tile.
- Since:
- 0.65.4
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
tileSize |
Number
|
Size of the tile as determined by templateManager |
paletteBM |
Object
|
An collection of Uint32Arrays containing the palette BM uses |
shouldSkipTransTiles |
boolean
|
Should transparent tiles be skipped over when creating the template? |
shouldAggSkipTransTiles |
boolean
|
Should transparent tiles be aggressively skipped over when creating the template? |
Returns:
- Type:
-
Object
Collection of template bitmaps & buffers organized by tile coordinates
deleteTemplate()
Deletes a template from the JSON object. Also delete's the corrosponding Template class instance
- Source:
(async) downloadAllTemplates()
Downloads all templates loaded.
- Since:
- 0.88.499
- Source:
(async) downloadAllTemplatesFromStorage()
Downloads all templates from Blue Marble's template storage.
- Since:
- 0.88.474
- Source:
(async) downloadTemplate(template)
Downloads the template passed-in.
- Since:
- 0.88.499
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
template |
Template
|
The template class instance to download |
(async) drawTemplateOnTile(tileBlob, tileCoords)
Draws all templates on the specified tile. This method handles the rendering of template overlays on individual tiles.
- Since:
- 0.65.77
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
tileBlob |
File
|
The pixels that are placed on a tile |
tileCoords |
Array.<number>
|
The tile coordinates [x, y] |
encodedToNumber(encoded, encoding) → {number}
Decodes a number from a custom encoded string.
Parameters:
| Name | Type | Description |
|---|---|---|
encoded |
string
|
The encoded string |
encoding |
string
|
The characters to use when decoding |
Returns:
- Type:
-
number
Decoded number
Example
const encode = '012abcABC'; // Base 9
console.log(encodedToNumber('0', encode)); // 0
console.log(encodedToNumber('c', encode)); // 5
console.log(encodedToNumber('1A', encode)); // 15
console.log(encodedToNumber('1BCaA', encode)); // 12345
escapeHTML(text) → {string}
Sanitizes HTML to display as plain-text. This prevents some Cross Site Scripting (XSS). This is handy when you are displaying user-made data, and you must use innerHTML.
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string
|
The text to sanitize |
Returns:
- Type:
-
string
HTML escaped string
Example
const paragraph = document.createElement('p');
paragraph.innerHTML = escapeHTML('<u>Foobar.</u>');
// Output:
// (Does not include the paragraph element)
// (Output is not HTML formatted)
<p>
"<u>Foobar.</u>"
</p>
getClipboardData(eventopt) → {string}
Handles reading from the clipboard. Assume this only returns text. Assume this requires user input.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
event |
ClipboardEvent
|
<optional> |
(Optional) The clipboard event that triggered this to run |
Returns:
- Type:
-
string
The clipboard data as a string
getObserverBody() → {MutationObserver}
Retrieves the MutationObserver that watches document.body
- Since:
- 0.43.2
- Source:
Returns:
- Type:
-
MutationObserver
getWplaceVersion() → {Date|undefined}
Returns a Date of when Wplace was last updated. This is obtained from a certain DOM element which contains the version of Wplace.
Returns:
- Type:
-
Date|undefined
- The date that Wplace was last updated, as a Date.
handleDisplayError(text)
Handles error display. This will output plain text into the output Status box. Additionally, this will output an error to the console.
- Since:
- 0.41.6
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string
|
The error text to display. |
handleDisplayStatus(text)
Handles status display. This will output plain text into the output Status box. Additionally, this will output an info message to the console.
- Since:
- 0.58.4
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
text |
string
|
The status text to display. |
handleDrag(moveMeSelector, iMoveThingsSelector)
Handles dragging of the overlay. Uses requestAnimationFrame for smooth animations and GPU-accelerated transforms. Make sure to use the appropriate CSS selectors.
- Since:
- 0.8.2
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
moveMeSelector |
string
|
The element to be moved |
iMoveThingsSelector |
string
|
The drag handle element |
handleMinimization(button)
Handles the minimization logic for windows spawned by Blue Marble
- Since:
- 0.88.142
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
button |
HTMLButtonElement
|
The UI button that triggered this minimization event |
hexToRGB(hex) → {Array.<number, number, number>}
Converts a hexdecimal color to an RGB color. Alpha channel not supported.
Parameters:
| Name | Type | Description |
|---|---|---|
hex |
string
|
Hex color code as string |
Returns:
- Type:
-
Array.<number, number, number>
RGB color as an Array
importJSON(json)
Imports the JSON object, and appends it to any JSON object already loaded
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
json |
string
|
The JSON string to parse |
inject(callback)
Injects code into the client This code will execute outside of TamperMonkey's sandbox
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
*
|
The code to execute |
localizeDate(date) → {string}
Returns the localized date format.
Parameters:
| Name | Type | Description |
|---|---|---|
date |
number
|
The date to localize |
Returns:
- Type:
-
string
Localized date as a string
localizeDuration(durationTotalMs) → {string}
Returns the localized duration format.
Parameters:
| Name | Type | Description |
|---|---|---|
durationTotalMs |
number
|
The duration to localize, in milliseconds |
Returns:
- Type:
-
string
Localized duration as a string
localizeNumber(number) → {string}
Returns the localized number format.
Parameters:
| Name | Type | Description |
|---|---|---|
number |
number
|
The number to localize |
Returns:
- Type:
-
string
Localized number as a string
localizePercent(percent) → {string}
Returns the localized percentage format.
Parameters:
| Name | Type | Description |
|---|---|---|
percent |
number
|
The percentage to localize |
Returns:
- Type:
-
string
Localized percentage as a string
negativeSafeModulo(a, b) → {number}
Negative-Safe Modulo. You can pass negative numbers into this.
Parameters:
| Name | Type | Description |
|---|---|---|
a |
number
|
The first number |
b |
number
|
The second number |
Returns:
- Type:
-
number
Result
numberToEncoded(number, encoding) → {string}
Encodes a number into a custom encoded string.
Parameters:
| Name | Type | Description |
|---|---|---|
number |
number
|
The number to encode |
encoding |
string
|
The characters to use when encoding |
Returns:
- Type:
-
string
Encoded string
Example
const encode = '012abcABC'; // Base 9
console.log(numberToEncoded(0, encode)); // 0
console.log(numberToEncoded(5, encode)); // c
console.log(numberToEncoded(15, encode)); // 1A
console.log(numberToEncoded(12345, encode)); // 1BCaA
observe(observer, watchChildList, watchSubtree)
Observe a MutationObserver
- Since:
- 0.43.2
- Source:
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
observer |
MutationObserver
|
The MutationObserver |
|
watchChildList |
boolean
|
false |
(Optional) Should childList be watched? False by default |
watchSubtree |
boolean
|
false |
(Optional) Should childList be watched? False by default |
observeBlack()
Observe the black color, and add the "Move" button.
rgbToHex(red, greenopt, blueopt) → {string}
Converts an RGB color to hexdecimal color. Octothorpe not included.
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
red |
number
|
Array.<number, number, number>
|
The Red channel of the RGB color, or all three channels as an Array |
|
green |
number
|
<optional> |
The Green channel of the RGB color |
blue |
number
|
<optional> |
The Blue channel of the RGB color |
Returns:
- Type:
-
string
Hex color code as string
selectAllCoordinateInputs() → {Array.<Element>}
Returns the coordinate input fields
Returns:
- Type:
-
Array.<Element>
The 4 coordinate Inputs
serverTPtoDisplayTP(tile, pixel) → {Array.<number, number>}
Converts the server tile-pixel coordinate system to the displayed tile-pixel coordinate system.
Parameters:
| Name | Type | Description |
|---|---|---|
tile |
Array.<string, string>
|
The tile to convert |
pixel |
Array.<string, string>
|
The pixel to convert |
Returns:
- Type:
-
Array.<number, number>
Tile and pixel coordinate pair
Example
console.log(serverTPtoDisplayTP(['12', '123'], ['34', '567'])); // [34, 3567]
setApiManager(apiManager)
Populates the apiManager variable with the apiManager class.
- Since:
- 0.41.4
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
apiManager |
ApiManager
|
The apiManager class instance |
setSettingsManager(settingsManager)
Populates the settingsManager variable with the settingsManager class.
- Since:
- 0.91.11
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
settingsManager |
SettingsManager
|
The settingsManager class instance |
setSettingsManager(settingsManager)
Updates the stored instance of the SettingsManager.
- Since:
- 0.91.54
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
settingsManager |
SettingsManager
|
The settings manager instance |
setTemplatesShouldBeDrawn(value)
Sets the templatesShouldBeDrawn boolean to a value.
- Since:
- 0.73.7
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
value |
boolean
|
The value to set the boolean to |
setWindowMain(windowMain)
Updates the stored instance of the main window.
- Since:
- 0.91.54
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
windowMain |
WindowMain
|
The main window instance |
sleep(time) → {Promise}
Halts execution of this specific userscript, for the specified time. This will not block the thread.
Parameters:
| Name | Type | Description |
|---|---|---|
time |
number
|
Time to wait in milliseconds |
Returns:
- Type:
-
Promise
Promise of a setTimeout()
spontaneousResponseListener(overlay)
Determines if the spontaneously received response is something we want.
Otherwise, we can ignore it.
Note: Due to aggressive compression, make your calls like data['jsonData']['name'] instead of data.jsonData.name
- Since:
- 0.11.1
- Source:
Parameters:
| Name | Type | Description |
|---|---|---|
overlay |
Overlay
|
The Overlay class instance |
toggleFlag(flagName, stateopt)
Toggles a boolean flag to the state that was passed in.
If no state was passed in, the flag will flip to the opposite state.
The existence of the flag determines its state. If it exists, it is true.
- Since:
- 0.91.60
- Source:
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
flagName |
string
|
The name of the flag to toggle |
|
state |
boolean
|
<optional> |
(Optional) The state to change the flag to |
uint8ToBase64(uint8) → {Uint8Array}
Converts a Uint8 array to base64 using the browser's built-in binary to ASCII function
Parameters:
| Name | Type | Description |
|---|---|---|
uint8 |
Uint8Array
|
The Uint8Array to convert |
Returns:
- Type:
-
Uint8Array
The base64 encoded Uint8Array
updateColorList() → {Object.<number, ColorData>}
Updates the information inside the colors in the color list. If the color list does not exist yet, it returns the color information instead. This assumes the information inside each element is the same between fullscreen and windowed mode.
- Since:
- 0.90.60
- Source:
Returns:
- Type:
-
Object.<number, ColorData>
updateInnerHTML(id, html, doSafeopt)
Updates the inner HTML of the element.
The element is discovered by it's id.
If the element is an input, it will modify the value attribute instead.
- Since:
- 0.24.2
- Source:
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
id |
string
|
The ID of the element to change |
||
html |
string
|
The HTML/text to update with |
||
doSafe |
boolean
|
<optional> |
false |
(Optional) Should |
(async) updateUserStorage()
Updates the user settings in userscript storage
- Since:
- 0.91.39
- Source:
viewCanvasInNewTab(canvas, lifeDurationopt)
View the canvas in a new tab.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
canvas |
HTMLCanvasElement
|
OffscreenCanvas
|
The canvas to view |
||
lifeDuration |
number
|
<optional> |
60_000 |
(Optional) The lifetime of the URL blob in milliseconds |
Type Definitions
ColorData
The information about a specific color on the palette.
Properties:
| Name | Type | Description |
|---|---|---|
colorTotal |
number
|
string
|
|
colorTotalLocalized |
string
|
|
colorCorrect |
number
|
string
|
|
colorCorrectLocalized |
string
|
|
colorPercent |
string
|
|
colorIncorrect |
number
|
- Source:
Type:
-
Object