Idan Horowitz
20163c0584
LibJS: Add ThrowCompletionOr versions of the JS native function macros
...
The old versions were renamed to JS_DECLARE_OLD_NATIVE_FUNCTION and
JS_DEFINE_OLD_NATIVE_FUNCTION, and will be eventually removed once all
native functions were converted to the new format.
2021-10-20 12:27:19 +01:00
Idan Horowitz
56e769e4ba
LibJS: Replace usages of JS_{DECLARE, DEFINE}_NATIVE_GETTER
...
These macros are equivalent to JS_{DECLARE, DEFINE}_NATIVE_FUNCTION and
were only sometimes used, so let's just get rid of them altogether.
2021-10-20 12:27:19 +01:00
Linus Groh
52976bfac6
LibJS: Convert to_object() to ThrowCompletionOr
2021-10-13 09:55:10 +01:00
Linus Groh
3be26f56db
LibJS: Convert has_own_property() to ThrowCompletionOr
2021-10-03 20:14:03 +01:00
Linus Groh
ee8380edea
LibJS: Convert internal_own_property_keys() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
fbfb0bb908
LibJS: Convert internal_delete() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
e5409c6ead
LibJS: Convert internal_set() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
6c2b974db2
LibJS: Convert internal_get() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
d9895ec12d
LibJS: Convert internal_has_property() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
5da210125e
LibJS: Convert internal_define_own_property() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
0e69a6e487
LibJS: Convert internal_get_own_property() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
73bae7d779
LibJS: Convert internal_prevent_extensions() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
9b4362f10a
LibJS: Convert internal_is_extensible() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
8c81c84c18
LibJS: Convert internal_set_prototype_of() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
5148150e1c
LibJS: Convert internal_get_prototype_of() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Timothy Flynn
1139aa45b6
WebContent: Use ErrorType::NotAnObjectOfType instead of NotA
2021-09-12 00:16:39 +02:00
Andreas Kling
90cdeebfb3
LibWeb: Rename DOM::Window::document() => associated_document()
...
Match the spec nomenclature.
2021-09-09 21:25:10 +02:00
Sam Atkins
5220d6d2e5
WebContent: Implement $0
special variable in Browser JS Console
...
`$0` is a helpful variable in other browsers' JS consoles, which points
to whichever DOM Node is currently selected in the DOM Inspector. And
now we have it too! :^)
2021-09-06 18:20:26 +02:00
Sam Atkins
7838eab341
WebContent: Implement ConsoleGlobalObject which proxies to WindowObject
...
ConsoleGlobalObject is used as the global object when running javascript
from the Browser console. This lets us implement console-only functions
and variables (like `$0`) without exposing them to webpage content. It
passes other calls over to the usual WindowObject so any code that would
have worked in the webpage will still work in the console. :^)
2021-09-06 18:20:26 +02:00