summaryrefslogtreecommitdiff
path: root/op_crates/web/lib.deno_web.d.ts
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2021-01-07 18:06:08 +0000
committerGitHub <noreply@github.com>2021-01-07 19:06:08 +0100
commite61e81eb57351782862aa50775ce4348f10b1856 (patch)
tree6099aa60857f586774a195034f18ac1fb10ca519 /op_crates/web/lib.deno_web.d.ts
parentc347dfcd565c3a396ae84dff46e7374851913462 (diff)
feat: add --location=<href> and globalThis.location (#7369)
Diffstat (limited to 'op_crates/web/lib.deno_web.d.ts')
-rw-r--r--op_crates/web/lib.deno_web.d.ts66
1 files changed, 66 insertions, 0 deletions
diff --git a/op_crates/web/lib.deno_web.d.ts b/op_crates/web/lib.deno_web.d.ts
index 33d867753..491a0ee84 100644
--- a/op_crates/web/lib.deno_web.d.ts
+++ b/op_crates/web/lib.deno_web.d.ts
@@ -312,3 +312,69 @@ declare var FileReader: {
readonly EMPTY: number;
readonly LOADING: number;
};
+
+/** The location (URL) of the object it is linked to. Changes done on it are
+ * reflected on the object it relates to. Accessible via
+ * `globalThis.location`. */
+declare class Location {
+ constructor();
+ /** Returns a DOMStringList object listing the origins of the ancestor
+ * browsing contexts, from the parent browsing context to the top-level
+ * browsing context.
+ *
+ * Always empty in Deno. */
+ readonly ancestorOrigins: DOMStringList;
+ /** Returns the Location object's URL's fragment (includes leading "#" if non-empty).
+ *
+ * Cannot be set in Deno. */
+ hash: string;
+ /** Returns the Location object's URL's host and port (if different from the default port for the scheme).
+ *
+ * Cannot be set in Deno. */
+ host: string;
+ /** Returns the Location object's URL's host.
+ *
+ * Cannot be set in Deno. */
+ hostname: string;
+ /** Returns the Location object's URL.
+ *
+ * Cannot be set in Deno. */
+ href: string;
+ toString(): string;
+ /** Returns the Location object's URL's origin. */
+ readonly origin: string;
+ /** Returns the Location object's URL's path.
+ *
+ * Cannot be set in Deno. */
+ pathname: string;
+ /** Returns the Location object's URL's port.
+ *
+ * Cannot be set in Deno. */
+ port: string;
+ /** Returns the Location object's URL's scheme.
+ *
+ * Cannot be set in Deno. */
+ protocol: string;
+ /** Returns the Location object's URL's query (includes leading "?" if
+ * non-empty).
+ *
+ * Cannot be set in Deno. */
+ search: string;
+ /** Navigates to the given URL.
+ *
+ * Cannot be set in Deno. */
+ assign(url: string): void;
+ /** Reloads the current page.
+ *
+ * Disabled in Deno. */
+ reload(): void;
+ /** @deprecated */
+ reload(forcedReload: boolean): void;
+ /** Removes the current page from the session history and navigates to the
+ * given URL.
+ *
+ * Disabled in Deno. */
+ replace(url: string): void;
+}
+
+declare var location: Location;