Struct neon::types::JsUndefined
source · #[repr(transparent)]pub struct JsUndefined(_);
Expand description
The type of JavaScript
undefined
primitives.
Example
// Extract the console object:
let console: Handle<JsObject> = cx.global().get(&mut cx, "console")?;
// The undefined value:
let undefined = cx.undefined();
// Call console.log(undefined):
console.call_method_with(&mut cx, "log")?.arg(undefined).exec(&mut cx)?;
Implementations§
source§impl JsUndefined
impl JsUndefined
sourcepub fn new<'a, C: Context<'a>>(cx: &mut C) -> Handle<'a, JsUndefined>
pub fn new<'a, C: Context<'a>>(cx: &mut C) -> Handle<'a, JsUndefined>
Creates an undefined
value.
Although this method can be called many times, all undefined
values are indistinguishable.
See also: Context::undefined