overlay
MMO · 1 symbole · générée le 27 Oct 2026
overlay
Overlay.js:16Notes pinned over the page: a badge drawn next to an element, which follows it as the page scrolls -- the tickets and the checks of a page (mmo.admin's developer layer), a tour's steps, the texts a translator works on. What a note is, is its caller's: the overlay only draws it, and calls onclick.
- Espace de noms
MMO
Index
| notes | ||
| root | ||
| frame | ||
| find(target, from) | Find an element, into shadow roots. | |
| selectorOf(element) | A selector finding $element again: its id when it has one, else its tag and position under the nearest parent that has one; >>> where it is in a shadow root. | |
| add(note) | Pin a note. | |
| remove(id) | ||
| clear(layer) | Remove every note, or a layer's. | |
| ensureRoot() | ||
| update() | Place every pin on its target again, on the next frame. | |
| pick(options) | Let the user point at an element: hovering outlines it, a click picks it, Escape gives up. |
Propriétés3
notes
Overlay.js:18- Type
Map<string, {note: Object, pin: HTMLElement
root
Overlay.js:20- Type
?HTMLElement
frame
Overlay.js:21Méthodes8
find(target, from)
Overlay.js:29Find an element, into shadow roots.
| target | string | - a >>> b: b in the shadow root of a |
| from = document | Document | ShadowRoot | Element | |
| retourne | ?Element |
selectorOf(element)
Overlay.js:45A selector finding $element again: its id when it has one, else its tag and position under the nearest parent that has one; >>> where it is in a shadow root.
| element | Element | |
| retourne | string |
add(note)
Overlay.js:77Pin a note.
| note | ||
| retourne | ?HTMLElement | its pin; null when its target is not on the page |
remove(id)
Overlay.js:89| id |
clear(layer)
Overlay.js:95Remove every note, or a layer's.
| layer = null |
ensureRoot()
Overlay.js:101update()
Overlay.js:128Place every pin on its target again, on the next frame.
pick(options)
Overlay.js:150Let the user point at an element: hovering outlines it, a click picks it, Escape gives up.
| options = {} | ||
| retourne | Promise<?{element: Element, selector: string | >} null when the user gave up |