mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-11 23:32:14 +00:00
A script's $ object now has the other members the Dollar object page lists: about, appEncoding, bp, build, buildDate, colorPicker, decimalPoint, engineName, error, flags, gc, getenv, setenv, global, hiresTimer, level, line, locale, localize, memCache, os, screens, sleep, stack, strict and version. Scripts also get the global localize(object, ...values), toSource(value) and Object.prototype.toSource(). Each run starts with the interface's locale and its own $ state; $.setenv changes only the run's copy of LANG, LC_MESSAGES, LC_ALL and OS, and $.getenv returns null for every other name. $.sleep waits from 0 to 1,000 ms between frames, and script.stop ends the wait. toSource writes plain data only and throws on cycles, getters, host objects and values past the data limits. The script checker reports $.localize as a $ member instead of the global localize function.