about summary refs log tree commit diff stats
path: root/src/html/formdata.nim
Commit message (Collapse)AuthorAgeFilesLines
* Eliminate some superfluous copiesbptato2025-05-111-1/+1
|
* Re-add JSValueConstbptato2025-03-121-2/+2
| | | | | | | | | 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: remove exceptionsbptato2025-02-261-1/+1
| | | | | | | | | | | | | 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.
* formdata: fix FormData constructor, append filename handlingbptato2025-02-051-19/+22
| | | | + some strict defs
* env, dom: add crypto.getRandomValues, HTMLInputElement.filesbptato2025-01-161-4/+4
|
* dom: button fixesbptato2025-01-051-1/+1
|
* dom: add some table interfacesbptato2025-01-041-1/+1
|
* default(T) -> T.default, add some strict defsbptato2024-12-171-1/+1
|
* formdata: eliminate a global varbptato2024-11-151-11/+8
|
* js: reorganize modules, update docsbptato2024-11-151-1/+1
| | | | | | | most of it has already been moved to monoucha, and the rest fits better in other directories. also, move urimethodmap to config
* base64: merge into twtstr/envbptato2024-10-131-1/+0
|
* dom: remove generic JS bindingsbptato2024-08-111-13/+18
| | | | Dispatch manually with fromJS instead.
* Fixes for Nim 2.2bptato2024-07-291-1/+0
| | | | | | | | | * xmlhttprequest: fix missing import * painter: generic tuple workaround * dynstream: merge module with implementations (so it will work with vtables) Not enabling vtables yet since it doesn't work with refc.
* Move JS wrapper into Monouchabptato2024-06-031-4/+4
| | | | Operation "modularize Chawan somewhat" part 3
* buffer: fix multipart formsbptato2024-05-111-8/+14
| | | | | | | | | * fix enctype not getting picked up * fix form data constructor requiring open() syscall (which gets blocked by our seccomp filter) * add closing boundary to multipart end * pass fds instead of path names through WebFile/Blob and send those through bufwriter/bufreader
* base64: rewrite btoa toobptato2024-04-211-2/+2
| | | | why not
* Update code stylebptato2024-04-171-7/+7
| | | | | | * separate params with ; (semicolon) instead of , (colon) * reduce screaming snake case use * wrap long lines
* js: proper distinction between Opt/Optionbptato2024-03-241-1/+1
| | | | | | | | | | | | | | | | until now, this had very strange (and inconsistent) semantics: * err() was used for exception propagation, but also as a null value * Option accepted undefined as a none value, but not null * Opt and Option were used interchangeably (and mostly randomly) Now, Result is always used for error reporting, and err(nil) means JS_EXCEPTION. (Opt is a special case of Result where we don't care about the error type, and is not used in JS.) Option on the other hand means "nullable variation of normally non-nullable type", and translates to JS_NULL. In JS we mainly use it for turning strings nullable.
* buffer: form fixes & improvementsbptato2024-03-241-6/+6
| | | | | | | * fall back to text for unimplemented input types * add custom prompt to all text-like input types * show min/max for range * fix accidental override of repaint
* catom: at -> satbptato2024-03-211-5/+5
| | | | just for consistency
* Move around some modulesbptato2024-03-141-0/+177
* extern -> gone, runproc absorbed by pager, others moved into io/ * display -> local/ (where else would we display?) * xhr -> html/ * move out WindowAttributes from term, so we don't depend on local from server