about summary refs log tree commit diff stats
path: root/src/html/dom.nim
Commit message (Collapse)AuthorAgeFilesLines
...
* dom: atomize id, name, DOMTokenListbptato2024-02-081-36/+72
|
* dom: reduce tagType usebptato2024-02-081-55/+38
| | | | | tagType is now a function call, but usually it's enough to just test for the object type.
* Fix some document.write bugsbptato2024-02-071-1/+13
|
* Incremental renderingbptato2024-02-071-2/+7
| | | | | | | | | | | | Yay! Admittedly, it is not very useful in its current form, except maybe on very slow networks. The problem is that renderDocument is *slow*, so we only run it when onload fails to consume all bytes from the network in a single pass. Even then, we are guaranteed to get a FOUC, since CSS is only downloaded in finishLoad(). Well, I think it's cool, anyway.
* Update chamebptato2024-02-071-390/+632
| | | | | | | | * Update chame to the latest version * Get rid of nodeType usage * Add atoms * Re-implement DOM attributes * document.write
* Fix form action when submitter has a "form" attrbptato2024-01-191-17/+26
| | | | | | | * Unify form variable for all form-associated elements * Fix broken form association logic in resetFormOwner * Use form action for all form-associated submitters * Remove unused getElementsByTag + de-extern some functions
* dom: fix innerHTML tag name regressionbptato2024-01-171-2/+8
|
* dom: fix invalid object conversion defectbptato2024-01-171-1/+1
|
* dom: standard-compliant innerHTML/outerHTMLbptato2024-01-121-5/+67
| | | | | | | | It's still not perfect, but at least now we do not apply non-standard whitespace changes. The stringifier is left as it is since it's more useful for debugging this way.
* Fix some casing issuesbptato2024-01-061-3/+5
|
* Compile with styleCheck:usagesbptato2023-12-281-6/+6
| | | | much better
* dom: export import maps allowedbptato2023-12-251-1/+1
| | | | whoops
* dom: use JS_EvalFunction; add module fetching stubsbptato2023-12-251-48/+82
| | | | (still no module support in buffer...)
* Fix warnings on Nim 2.0.2bptato2023-12-241-1/+2
| | | | | | | | One is a false-positive (in dom). The other one in pager is something I hadn't noticed before, that's nice. For now I want to avoid making a change that may break things, so I just removed the dead code.
* dom: use std/ in importsbptato2023-12-221-8/+8
|
* dom: simplify fetch classic scriptbptato2023-12-221-22/+21
|
* html/dom: do not submit implicitly if there is a submit buttonbptato2023-12-181-8/+10
| | | | | | | | | | | | | | | | See e.g. the sr.ht issue tracker, now forever tainted by the tickets I accidentally submitted :P Chawan will gladly autosubmit without the user having written anything in the textbox just by writing some text in the title. The problem is that graphical web browsers typically have a "submit" keybinding (enter), and a "next field" keybinding (tab). The implicit submission mechanism was created with graphical browsers in mind; like w3m, Chawan only has an "ok" keybinding, which may or may not also mean "submit". With this solution, only forms that could not otherwise be submitted will autosubmit.
* break up twtstr somewhatbptato2023-12-131-0/+1
| | | | | Avoid computing e.g. charwidth data for http which does not need it at all.
* dom: fix relList setter regression, remove rel()bptato2023-12-021-5/+14
|
* dom: redefine Node.contains to match standardbptato2023-12-011-4/+6
| | | | (and expose it as a JS function)
* dom: functionize parentElement, improve Node.documentbptato2023-12-011-7/+7
| | | | | | * parentElement is now just a function. * Remove TODO from node.document; it is useful and not going anywhere. * Check for Nim type in Node.document, not nodeType
* dom: fix `children' being available for all Nodesbptato2023-12-011-6/+17
| | | | It is only defined for Document, Element, DocumentFragment.
* html: add HTMLElement.dataset (+ some twtstr cleanup)bptato2023-12-011-15/+63
|
* dom: add document.readyStatebptato2023-11-271-0/+6
|
* dom: expose HTMLInputElement.checkedbptato2023-11-241-1/+1
|
* env: stub out window.getComputedStyle()bptato2023-11-211-1/+1
| | | | not a real implementation, just to reduce exceptions
* dom: add baseURI, insertAdjacentHTMLbptato2023-11-201-0/+35
|
* twtstr: remove tolower, isWhitespacebptato2023-11-201-1/+1
| | | | | | | | * tolower: strutils toLowerAscii is good enough for the cases where we need it. Also, it's easy to confuse with unicode toLower and vice versa. * isWhitespace: in AsciiWhitespace is more idiomatic. Also has a naming collision with unicode toLower.
* dom: fix lastElementChildbptato2023-11-131-1/+1
|
* dom: expose head, body, window (as defaultView)bptato2023-10-251-3/+3
|
* dom: add some CSSStyleDeclaration functionsbptato2023-10-251-0/+44
|
* reduce new() usagebptato2023-10-251-42/+33
|
* dom: proper relList supportbptato2023-10-251-30/+71
|
* Add jspropnames, CSSStyleDeclaration stubbptato2023-10-251-25/+103
|
* dom: add cloneNodebptato2023-10-241-2/+89
|
* dom: add outerHTML setterbptato2023-10-231-53/+143
| | | | Also, misc. refactorings
* Add innerHTML setterbptato2023-10-231-7/+27
| | | | yay
* dom: use same url in eval filename as in the console.log statementbptato2023-10-221-2/+2
|
* WindowAttributes: refactorbptato2023-10-191-1/+1
| | | | | | * rename module (window -> winattrs, to avoid conflict with env/window) * do not use result * remove unused cell_ratio
* Refactor Consolebptato2023-10-131-41/+2
| | | | | * merge dom.console & client.Console * move client-specific stuff out of Console (into callbacks when necessary)
* Use twtstr.join everywherebptato2023-10-011-1/+1
|
* Get rid of unicode.toLowerbptato2023-10-011-3/+3
| | | | | It was used by mistake in a hundred percent of the cases we were using it.
* Improve implicit form submissionbptato2023-09-301-10/+15
| | | | | | * Implement the "default button" part of the standard. * If the submitter is the form, formmethod may be called on it. Check if this is the case in the function, and if yes, return the form's method.
* client, timeout: simplifybptato2023-09-241-1/+1
| | | | | We don't use the generic feature of selectors, so just unify the client & buffer timeout types.
* fix size for some input typesbptato2023-09-221-1/+1
| | | | | | padToWidth should be called for all input types in InputWithSize. Also, they should be underlined by ua.css.
* buffer: support <a name=... for anchor navigationbptato2023-09-201-0/+9
|
* update chamebptato2023-09-191-2/+1
| | | | and with that, resolve the unknown input type issue
* dom: fix regressionbptato2023-09-191-1/+1
|
* dom: add document.all, misc fixesbptato2023-09-191-17/+63
| | | | | | | | * Fix an issue with Collection cache invalidation (we must invalidate collections of the parent node on insertion, so that it triggers a refresh). * Remove circular reference of document.document, now we use a function instead.
* dom: exclude password from exception logbptato2023-09-191-1/+3
|