about summary refs log tree commit diff stats
path: root/src/html/env.nim
Commit message (Collapse)AuthorAgeFilesLines
* url: add schemeType, fix port bug on protocol assignmentbptato2025-05-031-1/+1
| | | | Allows branching on the scheme without string comparisons.
* xmlhttprequest: fix open with credentialsbptato2025-03-231-5/+8
| | | | | * ignore username/password if undefined * do not throw on subsequent fetch with username/password
* env, client: fix fetch on Clientbptato2025-03-231-1/+4
|
* env: make MediaQueryList an EventTargetbptato2025-03-231-2/+3
|
* Re-add JSValueConstbptato2025-03-121-11/+11
| | | | | | | | | This time, I've also ported over the consistency check to prevent some ownership bugs. Unfortunately, the check is very limited, and it is still possible to double-free or leak JSValues. I think it would be possible to make coverage 100%, but only with ARC...
* dynstream, console: remove DynFileStreambptato2025-02-261-2/+1
| | | | | Conflating buffered streams with non-buffered streams is generally a bad idea.
* dynstream: remove exceptionsbptato2025-02-261-2/+2
| | | | | | | | | | | | | Now we just pass down the value of n and check errno, plus readDataLoop/writeDataLoop returns a bool indicating whether it failed. For now this seems to work OK, but maybe I'll add a better abstraction in the future. EOFError is still used for handling failed packets; this is brittle, and should be replaced once we have a proper buffering mechanism for them. (That will also let us kill BufStream.) Unrelated: this also fixes a bug in buffer with cacheId.
* env: shim pushStatebptato2025-02-201-0/+8
| | | | not standard-compliant, but better than nothing
* fromjs, javascript: optimize out class name registrybptato2025-02-191-12/+14
| | | | | | | | Instead of hashing the class name for isInstanceOf, we now just reuse the Nim type pointer -> JSClassID map, which should be more efficient. This removes getClass and hasClass; these can be replaced by just reusing the class ID returned from registerType.
* xhr, event, catom: fix some bugsbptato2025-02-151-10/+8
| | | | Event handler functions can be set twice now.
* buffer: remove estream, fdbptato2025-02-141-1/+1
|
* catom: make factory globalbptato2025-02-131-5/+4
| | | | | This isn't great, but neither was passing around a pointer that pointed to a single object.
* dom: add fireEvent for Event objectsbptato2025-02-081-1/+1
|
* dom: basic module supportbptato2025-02-011-0/+28
| | | | probably breaks with TLA
* event: fix some refcounting bugsbptato2025-01-281-1/+0
|
* chadombuilder: perform microtask checkpoint on script insertionbptato2025-01-231-8/+0
|
* Add annotations for move semanticsbptato2025-01-221-1/+1
| | | | | | | | | Supposedly they aren't broken in refc after 2.0.0, so we can do this now that 1.6.14 is dropped. I've confirmed lent to work as advertised; it indeed reduces copies. sink doesn't seem to help much, but I guess it will be useful once we switch to ORC.
* javascript: add .jsrget, .jsrfgetbptato2025-01-221-16/+13
| | | | Implements the [Replaceable] WebIDL property.
* dom: CSSStyleDeclaration improvementsbptato2025-01-191-5/+1
| | | | Now getComputedStyle works with pseudo-elements too.
* dom, stylednode: move more fields, handle pseudo-element getComputedStylebptato2025-01-181-1/+1
|
* env, dom: add crypto.getRandomValues, HTMLInputElement.filesbptato2025-01-161-1/+16
|
* dom: more select interfacesbptato2025-01-101-4/+2
| | | | this should be all of them
* env: basic postMessagebptato2025-01-091-2/+15
|
* Add performance modulebptato2025-01-091-0/+8
| | | | | Just to replace what QJS-NG has, because I don't want to expose a nanosecond precision clock.
* mediaquery: add serializationbptato2025-01-061-1/+1
| | | | also, reduce the number of types named MediaQueryList by 50%
* dom: add document.referrerbptato2025-01-061-1/+2
| | | | Only works if referer-from is enabled.
* env: add media query matchingbptato2025-01-061-0/+22
| | | | | | | In lite mode, it uses default window attributes. Incidentally, this also untangles media query matching from cascade, saving us a forward declaration hack (yay!)
* env, buffer: restyle on getComputedStylebptato2025-01-031-0/+1
| | | | | | style/layout invalidation is a mess :( Fixes acid3 test00
* dom, cssvalues: add getComputedStylebptato2024-12-301-3/+5
| | | | Only available in "app" mode.
* env: stub postMessagebptato2024-12-301-0/+3
|
* env: add innerWidth, innerHeightbptato2024-12-281-0/+6
|
* env: do not copy attrs, fix screen on clientbptato2024-12-281-4/+4
| | | | Now screen.width etc. works in the pager too.
* dom: add focus()bptato2024-12-271-2/+3
| | | | Respects autofocus.
* Optimize some Option[string] outbptato2024-12-261-7/+7
| | | | toJS is generally more efficient
* env: fix taintEnabledbptato2024-12-261-1/+1
| | | | it should have been a function
* buffer: add "app" scripting modebptato2024-12-261-26/+38
| | | | | | | | | | 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-5/+5
|
* twtstr: reduce copying in atobbptato2024-12-121-3/+3
|
* env: allow data URL fetchbptato2024-12-051-1/+2
|
* mimetypes: refactor, use mime.types for inline image extensionsbptato2024-12-051-3/+4
| | | | | | | | | | | | * 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.
* loader/* -> serverbptato2024-11-241-4/+4
| | | | one less mystery
* buffer: proper toggleImages implementationbptato2024-11-211-1/+1
| | | | | | | It necessarily removes the config.images check from codec access, which I'm not quite happy about, so I've added a check to the DOM instead. (TODO: maybe pager should just dynamically grant codec access as a capability instead? but maybe that's even more error prone...)
* Update monoucha, fix some JS testsbptato2024-11-181-7/+8
|
* formdata: eliminate a global varbptato2024-11-151-2/+4
|
* js: reorganize modules, update docsbptato2024-11-151-5/+5
| | | | | | | most of it has already been moved to monoucha, and the rest fits better in other directories. also, move urimethodmap to config
* dom: add replaceChild, requestAnimationFramebptato2024-11-101-0/+9
|
* Clean up forward declarations a bitbptato2024-10-271-3/+3
|
* base64: merge into twtstr/envbptato2024-10-131-5/+26
|
* env: fix getComputedStyle arg2bptato2024-10-101-1/+1
|
* promise: remove newPromisebptato2024-10-101-3/+1
| | | | normal construction is enough (and it wasn't really used anyway)