about summary refs log tree commit diff stats
path: root/src/html/dom.nim
Commit message (Collapse)AuthorAgeFilesLines
* dom: clean up namespace handling, add createElementNSbptato2025-01-051-64/+91
|
* dom: DOMTokenList fixes/improvementsbptato2025-01-051-7/+14
|
* dom: add form length, fix document.getElementsByName("")bptato2025-01-051-0/+10
|
* dom: clean up, add some strict defsbptato2025-01-051-170/+171
|
* dom: button fixesbptato2025-01-051-3/+5
|
* dom: add some table interfacesbptato2025-01-041-25/+259
|
* dom: radiogroup fixesbptato2025-01-041-17/+20
|
* dom: implement cssFloatbptato2025-01-041-0/+4
|
* dom: JS input/form fixesbptato2025-01-031-1/+10
| | | | Fixes acid3 test 53
* env, buffer: restyle on getComputedStylebptato2025-01-031-0/+4
| | | | | | style/layout invalidation is a mess :( Fixes acid3 test00
* dom: make stringifiers explicit, optimize tokenList toStringbptato2025-01-031-3/+3
|
* dom: add option value setter, input checked setterbptato2025-01-031-22/+26
|
* dom: fully implement ParentNode mixinbptato2025-01-031-2/+108
| | | | | | | | * standard firstElementChild, lastElementChild * add childElementCount, prepend, append, replaceChildren supporting JSValue "this" values in Monoucha would be useful for these (so you could specify where it's defined in the jsfunc string)
* dom: add CSSStyleDeclaration setProperty, removeProperty; stub out scrollTobptato2025-01-021-17/+49
|
* layout, dom: input rendering fixesbptato2025-01-011-2/+2
| | | | | * do not display submit/reset text with empty value * fix erroneous blank placement with white-space: pre on new line
* dom: add cookie setter stub, HTMLSelectElement stuffbptato2025-01-011-19/+68
|
* dom: small refactoring + optimizationbptato2024-12-311-22/+14
|
* dom: expose currentScriptbptato2024-12-311-1/+1
|
* buffer: make video, audio clickablebptato2024-12-301-4/+4
| | | | | more intuitive than shoehorning it into "view image" (also makes it easier to apply the content type)
* dom, cssvalues: add getComputedStylebptato2024-12-301-2/+26
| | | | Only available in "app" mode.
* dom: add input type getter/setterbptato2024-12-301-1/+1
|
* script: improve defineConstsbptato2024-12-301-1/+1
| | | | | | Well, I guess this works for now, but something is still wrong. In Gecko, document.__proto__ === Document.__proto__, but in Chawan, it isn't.
* env: do not copy attrs, fix screen on clientbptato2024-12-281-4/+4
| | | | Now screen.width etc. works in the pager too.
* dom: standard querySelector/All; type erase childrenbptato2024-12-271-12/+50
|
* dom: set elIndex to -1 for AttrDummyElementbptato2024-12-271-0/+2
|
* dom: expose getPropertyValuebptato2024-12-271-1/+1
|
* dom: add focus()bptato2024-12-271-0/+6
| | | | Respects autofocus.
* Optimize some Option[string] outbptato2024-12-261-8/+8
| | | | toJS is generally more efficient
* buffer: add "app" scripting modebptato2024-12-261-1/+1
| | | | | | | | | | For APIs that cannot be implemented in a privacy-friendly manner. As a start, I've added accurate screen size queries; getComputedStyle, getBoundingClientRect, etc. should follow. (We have a harmless getComputedStyle already, but it's broken.) Probably, things like JS-based scroll belong in here too, but I'm not sure yet. (Perhaps autofocus should be reused instead?)
* env: reflect user agent header in userAgentbptato2024-12-261-0/+1
|
* dom: optimize textContent, nodeValue; add nodeValue setterbptato2024-12-221-16/+31
|
* dom: add inline SVG supportbptato2024-12-201-85/+178
|
* response: automatically resume before closebptato2024-12-191-5/+0
| | | | doing it manually is too error prone
* css: add :target pseudo classbptato2024-12-171-1/+12
|
* dom, match: optimize :nth-child, :nth-last-childbptato2024-12-171-8/+30
| | | | | | I want to use it in the UA sheet, so the loop won't cut it. (Also fix a parsing bug that prevented "of" from working.)
* default(T) -> T.default, add some strict defsbptato2024-12-171-1/+1
|
* css: resolve units to px before layoutbptato2024-12-161-6/+15
| | | | Lets us skip a couple pointless multiplications/divisions during layout.
* dom, css: fix case-insensitive class/id/attr matchingbptato2024-12-151-7/+9
| | | | Uses an additional lower-case map for O(1) case-insensitive comparisons.
* css: align h[1-6] behavior with w3mbptato2024-12-141-0/+23
| | | | | | | | | | | Implemented using proprietary selectors -cha-first-node and -cha-last-node, modeled after -moz-first-node and -moz-last-node. I think they are compatible. That does mean this is more limited than w3m's trimming, e.g. it can't really deal with nesting or empty tags. I think this is fine, as it's mainly meant for unstyled documents in the first place (which are unlikely to have e.g. MAIN tags).
* dom: remove cached childNodes, children pointersbptato2024-12-131-34/+37
| | | | | | | Instead, just define the actual value over the getter function on the first use. Also, avoid accidentally creating the attributes NamedNodeMap on adopt.
* dom: queryCommandSupported, HTMLIFrameELement stubbptato2024-12-131-0/+7
|
* mimetypes: use cmpIgnoreCase for JS typesbptato2024-12-121-4/+4
|
* cssparser: misc cleanupbptato2024-12-071-2/+2
| | | | another case of "the object model was unnecessarily complex"
* dom: another insertAdjacentHTML fixbptato2024-12-071-2/+2
| | | | ctx can be HTML even if we take `this'
* dom: fix crash on insertAdjacentHTMLbptato2024-12-071-28/+15
| | | | In my defense, it was broken in the spec too.
* mimetypes: refactor, use mime.types for inline image extensionsbptato2024-12-051-2/+16
| | | | | | | | | | | | * remove std/streams use from mime.types; mmap and parse directly * use mime.types for inline image extensions * add some jpeg file extensions Latter came up because I was trying to add a format locally and it wouldn't recognize it on images from my file system (i.e. by extension). As a security measure we still do not allow additional extensions for predefined inline image types.
* dom: add support for @importbptato2024-12-011-26/+33
| | | | only the most basic form; no media queries yet
* twtstr: add mypairsbptato2024-11-281-8/+8
| | | | | This couldn't get into system.nim for technical reasons, but it's still pretty useful when iterating over non-mutable openArrays.
* dom: fix some comparisonsbptato2024-11-241-2/+2
|
* loader/* -> serverbptato2024-11-241-4/+4
| | | | one less mystery