diff options
Diffstat (limited to 'src/html')
-rw-r--r-- | src/html/dom.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/html/dom.nim b/src/html/dom.nim index 39083db2..a452442a 100644 --- a/src/html/dom.nim +++ b/src/html/dom.nim @@ -2653,8 +2653,8 @@ func parseURL*(document: Document, s: string): Option[URL] = func media*[T: HTMLLinkElement|HTMLStyleElement](element: T): string = return element.attr(atMedia) -func title*(document: Document): string = - for title in document.elements(TAG_TITLE): +func title*(document: Document): string {.jsfget.} = + if (let title = document.findFirst(TAG_TITLE); title != nil): return title.childTextContent.stripAndCollapse() return "" |