Wren

Module document

The document's address, origin and cookies. Window_origin and Window_isSecureContext belong to WindowOrWorkerGlobalScope: in a worker they describe the worker.

Exposed to: Window, Worker. Source: api/document.widl.

Odin: import "wren:document".

Functions

Document_URL

string Document_URL() raises

document.URL. Invalid_Handle in a worker (see WorkerGlobalScope_location).

Odin: document.URL.

Raises: returns an Error (see web).

Host: Document_URL :: proc(c: ^Call) -> (string, Api_Error)

Window_origin

string Window_origin()

self.origin ("null" for an opaque origin).

Host: Window_origin :: proc(c: ^Call) -> string

Window_isSecureContext

bool Window_isSecureContext()

self.isSecureContext

Host: Window_isSecureContext :: proc(c: ^Call) -> bool

string Document_cookie_get() raises

document.cookie: the cookies scripts may see, "name=value; ...". Security for a document without a tuple origin on http(s), and in a worker.

Odin: document.cookie_get.

Raises: returns an Error (see web).

Host: Document_cookie_get :: proc(c: ^Call) -> (string, Api_Error)

i32 Document_cookie_set(string cookie) raises

document.cookie = cookie. 0 when stored (or deleted), else 1 + the browser's reason (cookies.Store_Result) for refusing it. Security as for the getter.

Odin: document.cookie_set.

Raises: returns an Error (see web).

Host: Document_cookie_set :: proc(c: ^Call, cookie: string) -> (i32, Api_Error)

Edit this page on GitHub