Type Alias mozjs::jsapi::FilenameValidationCallback
source · pub type FilenameValidationCallback = Option<unsafe extern "C" fn(_: *mut JSContext, _: *const i8) -> bool>;
Expand description
Install a process-wide callback to validate script filenames. The JS engine will invoke this callback for each JS script it parses or XDR decodes.
If the callback returns |false|, an exception is thrown and parsing/decoding will be aborted.
See also CompileOptions::setSkipFilenameValidation to opt-out of the callback for specific parse jobs.
Aliased Type§
enum FilenameValidationCallback {
None,
Some(unsafe extern "C" fn(_: *mut JSContext, _: *const i8) -> bool),
}