mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 18:27:39 +00:00
LibWeb: Convert the Location object to IDL
This includes: - Moving it from Bindings/ to HTML/ - Renaming it from LocationObject to Location - Removing the manual definitions of the constructor and prototype - Removing special handling of the Location interface from the bindings generator - Converting the JS_DEFINE_NATIVE_FUNCTIONs to regular functions returning DeprecatedString instead of PrimitiveString - Adding missing (no-op) setters for the various attributes, which are expected to exist by the bindings generator
This commit is contained in:
parent
78d6de2ec1
commit
afc055c088
19 changed files with 271 additions and 333 deletions
19
Userland/Libraries/LibWeb/HTML/Location.idl
Normal file
19
Userland/Libraries/LibWeb/HTML/Location.idl
Normal file
|
@ -0,0 +1,19 @@
|
|||
// https://html.spec.whatwg.org/multipage/nav-history-apis.html#location
|
||||
[Exposed=Window]
|
||||
interface Location { // but see also additional creation steps and overridden internal methods
|
||||
[LegacyUnforgeable] stringifier attribute USVString href;
|
||||
[LegacyUnforgeable] readonly attribute USVString origin;
|
||||
[LegacyUnforgeable] attribute USVString protocol;
|
||||
[LegacyUnforgeable] attribute USVString host;
|
||||
[LegacyUnforgeable] attribute USVString hostname;
|
||||
[LegacyUnforgeable] attribute USVString port;
|
||||
[LegacyUnforgeable] attribute USVString pathname;
|
||||
[LegacyUnforgeable] attribute USVString search;
|
||||
[LegacyUnforgeable] attribute USVString hash;
|
||||
|
||||
// TODO: [LegacyUnforgeable] undefined assign(USVString url);
|
||||
[LegacyUnforgeable] undefined replace(USVString url);
|
||||
[LegacyUnforgeable] undefined reload();
|
||||
|
||||
// TODO: [LegacyUnforgeable, SameObject] readonly attribute DOMStringList ancestorOrigins;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue