Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

Latest commit

 

History

History
8 lines (8 loc) · 642 Bytes

Sandbox.md

File metadata and controls

8 lines (8 loc) · 642 Bytes
function loadedFunc, Context ctx, Hook hook Sandbox:Load(string code, table env, bool mergeMode=false)

This loads the supplied code as a function and sets the environment. This is the same as Context:Load with the exception that it creates a sandboxed environment if an environment is not provided. Generally you should provide a sandboxed environment (e.g. by extending an environment generated by the below function) if you provide one at all.

table environment, Hook hook Sandbox:MakeEnvironment(Context context)

This returns a sandboxed environment and a Hook (see Hook API) for the supplied context.