Skip to main content

JS_GetScriptOrModuleName

Function JS_GetScriptOrModuleName 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn JS_GetScriptOrModuleName( ctx: *mut JsContext, n_stack_levels: c_int, ) -> Atom
Expand description

JS_GetScriptOrModuleName: the file name of the code at n_stack_levels up.

Level 0 is whatever is running now, which for a top-level evaluation is the <eval> name the host passed to JS_Eval; a larger level walks outwards through the call stack, and a level past the end answers JS_ATOM_NULL — the reference’s NULL.

§Safety

ctx must be a live context.