Index

Window

MMO.core · 1 symbol · generated 30 Sep 2026

class

Window

Window.js:11

window

class MMO.core.Window extends MMO.core.EventEmitter
Namespace
MMO.core
Extends
EventEmitter

Index

width readonly accessor
height readonly accessor
scrollX readonly accessor
scrollY readonly accessor
scrollHeight readonly accessor
scrollWidth readonly accessor
device readonly accessorThe breakpoint name the stylesheet publishes through body::after { content }.
constructor(window, guid)
toString()
getSize()A snapshot of every geometry value at once, as carried by the resize event.
lockRun()Lock the run queue, so it is not put on animation frame until it is unlocked
unlockRun()Unlock the run queue
createAnimationFrame()Internal function to create the animation frame that consumes the run queue
run(func, args)Calls requestAnimationFrame with a callback
loopRun() generatorYield the callbacks still waiting in the run queue, from the current position.
cancelRun(func)Cancel all or a specific callback being animated
onError(error)Private function calls by browser when an error is thrown and not caught
onGoto()Private function calls by browser when url's hash changed For an html element to be focusable, don't forget to add the attribute tab_index="-1"
onResize()Private function calls by browser when dom is resized
onScroll(e)Normalise event scroll

Properties7

scrollHeight

readonlyaccessorWindow.js:204
get scrollHeight()
Type
number

scrollWidth

readonlyaccessorWindow.js:211
get scrollWidth()
Type
number

device

readonlyaccessorWindow.js:222

The breakpoint name the stylesheet publishes through body::after { content }.

get device()
Type
string
This is what lets the js branch on the SAME breakpoints as the css.

Methods13

constructor(window, guid)

Window.js:12
constructor(window, guid = null)
window
guid = null

toString()

Window.js:173
toString()
returnsstringthe window's GUID name

getSize()

Window.js:231

A snapshot of every geometry value at once, as carried by the resize event.

getSize()
returnswidth, height, scrollWidth, scrollHeight, scrollX, scrollY, device}

lockRun()

Window.js:249

Lock the run queue, so it is not put on animation frame until it is unlocked

lockRun()

createAnimationFrame()

Window.js:268

Internal function to create the animation frame that consumes the run queue

createAnimationFrame()

run(func, args)

Window.js:294

Calls requestAnimationFrame with a callback

run(func, ...args)
funcFunction | MMO.core.EventBinding
...args...the arguments to pass to the function

loopRun()

generatorWindow.js:320

Yield the callbacks still waiting in the run queue, from the current position.

*loopRun()

onError(error)

Window.js:354

Private function calls by browser when an error is thrown and not caught

onError(error)
error

onGoto()

Window.js:381

Private function calls by browser when url's hash changed For an html element to be focusable, don't forget to add the attribute tab_index="-1"

onGoto()

onResize()

Window.js:402

Private function calls by browser when dom is resized

onResize()