aboutsummaryrefslogtreecommitdiffstats
path: root/src/html
diff options
context:
space:
mode:
Diffstat (limited to 'src/html')
-rw-r--r--src/html/dom.nim7
-rw-r--r--src/html/env.nim3
2 files changed, 6 insertions, 4 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim
index 7cb6c5b4..96970d7b 100644
--- a/src/html/dom.nim
+++ b/src/html/dom.nim
@@ -113,6 +113,7 @@ type
urandom*: PosixStream
imageTypes*: Table[string, string]
userAgent*: string
+ referrer* {.jsget.}: string
autofocus*: bool
maybeRestyle*: proc()
@@ -1473,11 +1474,11 @@ func forms(document: Document): HTMLCollection {.jsfget.} =
)
return document.cachedForms
-func cookie(ctx: JSContext; document: Document): string {.jsfget.} =
+#TODO take cookie jar from loader
+func cookie(document: Document): string {.jsfget.} =
return document.internalCookie
-proc setCookie(ctx: JSContext; document: Document; cookie: string)
- {.jsfset: "cookie".} =
+proc setCookie(document: Document; cookie: string) {.jsfset: "cookie".} =
document.internalCookie = cookie
# DOMTokenList
diff --git a/src/html/env.nim b/src/html/env.nim
index 2db9a294..63ae6e21 100644
--- a/src/html/env.nim
+++ b/src/html/env.nim
@@ -379,7 +379,7 @@ proc runJSJobs*(window: Window) =
proc newWindow*(scripting: ScriptingMode; images, styling, autofocus: bool;
attrsp: ptr WindowAttributes; factory: CAtomFactory; loader: FileLoader;
url: URL; urandom: PosixStream; imageTypes: Table[string, string];
- userAgent: string): Window =
+ userAgent, referrer: string): Window =
let err = newDynFileStream(stderr)
let window = Window(
attrsp: attrsp,
@@ -396,6 +396,7 @@ proc newWindow*(scripting: ScriptingMode; images, styling, autofocus: bool;
urandom: urandom,
imageTypes: imageTypes,
userAgent: userAgent,
+ referrer: referrer,
autofocus: autofocus
)
window.location = window.newLocation()