diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-29 14:59:09 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-29 14:59:09 +0200 |
commit | 0eef1cb27a9cf8cca861ad2743a895c9382f292f (patch) | |
tree | 6ba5ab7ef23a6bdaa5210c5c08b707fae86672d4 /src/html | |
parent | 19068fd7d803a157de671e189e01731bc903ba9e (diff) | |
download | chawan-0eef1cb27a9cf8cca861ad2743a895c9382f292f.tar.gz |
Remove .jsgctor
Not sure how it ever worked. This fixes Text() constructors etc.
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/dom.nim | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 16335399..7fa012bc 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -1660,7 +1660,8 @@ func newText(document: Document, data: string): Text = index: -1 ) -func newText(window: Window, data: string = ""): Text {.jsgctor.} = +func newText(ctx: JSContext, data = ""): Text {.jsctor.} = + let window = ctx.getGlobalOpaque(Window).get return window.document.newText(data) func newCDATASection(document: Document, data: string): CDATASection = @@ -1687,7 +1688,8 @@ func newDocumentFragment(document: Document): DocumentFragment = index: -1 ) -func newDocumentFragment(window: Window): DocumentFragment {.jsgctor.} = +func newDocumentFragment(ctx: JSContext): DocumentFragment {.jsctor.} = + let window = ctx.getGlobalOpaque(Window).get return window.document.newDocumentFragment() func newComment(document: Document, data: string): Comment = @@ -1698,7 +1700,8 @@ func newComment(document: Document, data: string): Comment = index: -1 ) -func newComment(window: Window, data: string = ""): Comment {.jsgctor.} = +func newComment(ctx: JSContext, data: string = ""): Comment {.jsctor.} = + let window = ctx.getGlobalOpaque(Window).get return window.document.newComment(data) #TODO custom elements |