LiveFields - Things to avoid
ð« Blocked JavaScript Functions
To ensure safe and predictable execution of user-provided scripts, in addition to forward compatibility of scripts authored, the following JavaScript functions and DOM APIs are explicitly disallowed. These restrictions are suggested in GlobalSearch Web and strictly enforced in GlobalSearch Go.
â DOM Selection Functions
The following methods for selecting DOM elements are blocked:
Function | Description |
---|---|
| Selects an element by ID |
| Selects the first matching element |
| Selects all matching elements |
| Selects elements by name attribute |
| Selects elements by class name |
| Selects elements by tag name |
| Selects elements by tag name and namespace |
| Retrieves the current text selection |
â DOM Modification Functions
Direct manipulation of the DOM is prohibited:
Function | Description |
---|---|
| Appends a child node |
| Inserts a node before another |
| Removes a child node |
| Replaces one child node with another |
| Sets or gets HTML content |
| Sets or gets outer HTML |
| Sets or gets text content |
| Sets or gets visible text |
| Creates a new DOM element |
| Modifies element attributes |
â Style and Class Manipulation
Modifying visual presentation or class structure is blocked:
Function | Description |
---|---|
| Adds a CSS class |
| Removes a CSS class |
| Toggles a CSS class |
| Direct style manipulation |
â Unsafe or Legacy APIs
These functions are blocked due to security or stability concerns:
Function | Description |
---|---|
| Writes directly to the document |
| Adds event listeners (DOM-modifying) |