Throw type error when calling DOM constructor without new.

This commit is contained in:
Josh Matthews 2023-05-30 10:32:33 -04:00
parent 43f5b4899b
commit 56a8237ef4
3 changed files with 45 additions and 15 deletions

View file

@ -637,3 +637,7 @@ impl AsCCharPtrPtr for [u8] {
self as *const [u8] as *const c_char
}
}
pub unsafe fn callargs_is_constructing(args: &CallArgs) -> bool {
(*args.argv_.offset(-1)).is_magic()
}