Creates an evaluator that runs lines as JavaScript, much like the devtools console: the value of
the last statement is printed, { a: 1 } is an object literal, $_ is the previous result and
scope values are in scope. var and function declarations persist between lines as globals;
let/const do not. Lines run in sloppy mode.
await works at the top level when the line is a single expression (await Assets.load(url)).
Any other line with an await (several statements, or a declaration like var tex = await …)
runs inside an async function: its result is undefined and its declarations don't persist, so
write globalThis.tex = await … to keep a value.
Uses indirect eval, so a page whose Content-Security-Policy lacks 'unsafe-eval' (or that
enforces Trusted Types for scripts) refuses it: the console then prints a hint and commands keep
working. import "pixi.js/unsafe-eval" makes PixiJS itself work under a strict CSP; it does not
make this work.
Security: anyone who can type into the console can run any code in your page, and players can be
talked into pasting some. Use it in development builds or behind your own gate, never
unconditionally in production.
Creates an evaluator that runs lines as JavaScript, much like the devtools console: the value of the last statement is printed,
{ a: 1 }is an object literal,$_is the previous result andscopevalues are in scope.varand function declarations persist between lines as globals;let/constdo not. Lines run in sloppy mode.awaitworks at the top level when the line is a single expression (await Assets.load(url)). Any other line with anawait(several statements, or a declaration likevar tex = await …) runs inside an async function: its result isundefinedand its declarations don't persist, so writeglobalThis.tex = await …to keep a value.Uses indirect
eval, so a page whose Content-Security-Policy lacks'unsafe-eval'(or that enforces Trusted Types for scripts) refuses it: the console then prints a hint and commands keep working.import "pixi.js/unsafe-eval"makes PixiJS itself work under a strict CSP; it does not make this work.Security: anyone who can type into the console can run any code in your page, and players can be talked into pasting some. Use it in development builds or behind your own gate, never unconditionally in production.