Compiles and evaluates the given JavaScript source as an ES module.
Useful for agents that want to support loading user-provided scripts
inside their own script. This API offers the same benefits over eval()
as Script.evaluate(), in addition to encapsulating the user-provided
code in its own ES module. This means values may be exported, and
subsequently imported by other modules. The parent script may also export
values that can be imported from the loaded child script. This requires
that the parent uses the new ES module bundle format used by newer
versions of frida-compile.
Parameters
name: string
UNIX-style virtual filesystem name visible to other modules,
e.g. /plugins/screenshot.js.
Compiles and evaluates the given JavaScript
sourceas an ES module. Useful for agents that want to support loading user-provided scripts inside their own script. This API offers the same benefits overeval()asScript.evaluate(), in addition to encapsulating the user-provided code in its own ES module. This means values may be exported, and subsequently imported by other modules. The parent script may also export values that can be imported from the loaded child script. This requires that the parent uses the new ES module bundle format used by newer versions of frida-compile.