about summary refs log tree commit diff stats
path: root/src/io
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix compilation < Nim 2.0bptato2023-09-041-1/+1
| | | | Before Nim 2.0, addr could only be used with mutable variables.
* loader, data: remove stray eprintsbptato2023-09-022-4/+0
|
* loader: add data URLsbptato2023-09-014-5/+66
|
* javascript: factor out fromJSbptato2023-08-292-0/+2
|
* refactor: Result[T, JSError] -> JSResult[T]bptato2023-08-282-8/+7
|
* javascript: refactorbptato2023-08-283-4/+7
| | | | | | | Split out parts of the JS module, because it was starting to confuse the compiler a little. (Peakmem is back at 750M. Interesting.)
* Move charsets into chakasubptato2023-08-143-5/+8
| | | | Operation "modularize Chawan somewhat" part 1
* Add mailcap, mime.types & misc refactoringsbptato2023-08-1310-164/+302
| | | | | | | | * add mailcap: works with copiousoutput, needsterminal, etc. * add mime.types (only works with mailcap) * refactor pipeBuffer * remove "dispatcher" * fix bug in directory display where baseurl would not be used
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-012-1/+4
| | | | | | | | | | | | | | * Import punycode, as it has been removed from stdlib. * Fix some syntax errors * Apparently you can no longer compare distinct pointers with nil. Add explicit comparisons with typeof(nil) instead. * htmlparser: rename _ to other, as semantics of _ have changed. (Quite a shame, it looked better with _. Oh well.) * Explicitly specify mm:refc, as the browser OOMs with orc for some reason. Confirmed to compile & run on 2.0.0, 1.6.14, 1.6.12, 1.6.10 and 1.6.8. (<1.6.8 it's broken & wontfix.)
* Improve encoding supportbptato2023-07-122-33/+63
| | | | | | | | * Use the output charset in lineedit (as w3m does) * encoder: fix broken UTF-8 encoding, use openArray instead of var seq for input queue * Add RuneStream as an in-memory interface to EncoderStream * Document display-charset config option
* Buffer search fixes & improvementsbptato2023-07-111-9/+17
| | | | | * Fix race condition in updateReadLineISearch * Disable reshape during isearch
* Add proxy supportbptato2023-07-041-0/+6
|
* Add platform object conversion to union typebptato2023-07-022-17/+48
| | | | And with that, implement Request constructor with a Request init.
* return Result[T, JSError] from fromJSbptato2023-07-023-8/+6
|
* Factor out headers into separate modulebptato2023-07-017-59/+70
|
* use =destroy instead of finalizersbptato2023-07-013-0/+7
| | | | | This should help with moving to ORC in the future. (Also, finalizers do not work very well in the first place.)
* Factor out map search, remove sugarbptato2023-06-291-2/+10
|
* Support 8-bit output colorsbptato2023-06-261-1/+1
|
* hacks for readline so that it at least kind of worksbptato2023-06-251-2/+9
| | | | Proper fix needed later
* Do not allow text() twice, etc...bptato2023-06-202-7/+24
|
* Add Response.ok, url, fix type confusion with statusbptato2023-06-193-7/+17
|
* Reject fetch promise on network errorbptato2023-06-192-8/+10
| | | | Instead of setting the non-standard res variable.
* Get rid of the .jserr pragmabptato2023-06-191-10/+8
|
* Rework JS exception systembptato2023-06-194-13/+31
| | | | | Now we use Result for passing exceptions to JS. As a result, we can finally get rid of the .jserr pragma.
* Cleanups & bug fixes involving promisesbptato2023-06-155-69/+115
| | | | | Now a promise returning nil doesn't just leave the rest of the then chain hanging. Hooray.
* Make Result.text, json return promisebptato2023-06-133-16/+62
|
* Add indexed color, other png improvementsbptato2023-06-091-1/+1
|
* Simplify request.json, remove unused bindingsbptato2023-06-091-13/+4
|
* Show error messages, fix some fetch crashesbptato2023-06-092-0/+9
|
* Remove JSObject again, add File API constructorbptato2023-06-081-4/+6
|
* Fix bug in client's unregistered fd handlingbptato2023-06-061-0/+2
| | | | + run JS jobs after every poll in headless mode
* buffer: call handleError before handleRead & miscbptato2023-06-051-1/+1
|
* Refactor Request constructorbptato2023-06-051-22/+33
|
* Add support for canvas and multipartbptato2023-06-052-39/+32
| | | | | | | | | | | | | | | Quite incomplete canvas implementation. Crucially, the layout engine can't do much with whatever is drawn because it doesn't support images yet. I've re-introduced multipart as well, with the FormData API. For the append function I've also introduced a hack to the JS binding generator that allows requesting the JSContext pointer in nim procs. Really I should just fix the union generator thing and add support for overloading. In conclusion, for now the only thing canvas can be used for is exporting it as PNG and uploading it somewhere. Also, we now have PNG encoding and decoding too. (Now if only we had sixels as well...)
* Rewrite new Request bindingbptato2023-05-215-33/+116
| | | | | Still far from perfect, but now at least it has a bit more to do with what the standard mandates.
* Add url getter to requestbptato2023-05-201-2/+9
|
* Name negative response codesbptato2023-05-141-4/+12
|
* Async resource loading, exception handling fixesbptato2023-05-142-1/+23
|
* Fix some fetch crashesbptato2023-05-112-13/+15
| | | | Now it should work for very basic use-cases
* Improve debugging, reduce crashesbptato2023-05-092-5/+15
| | | | Loader no longer dies when not everything is read from the stream.
* Actually set proxybptato2023-04-301-1/+1
|
* only call Response.unregisterFun if not nilbptato2023-04-301-2/+4
|
* Temporarily disable multipartbptato2023-04-302-5/+5
| | | | It never really worked, and I can't be bothered to fix it now
* Make it compilebptato2023-04-301-0/+1
|
* Merge branch 'wip_fetch'bptato2023-04-302-25/+101
|\
| * WIP fetchbptato2023-04-302-25/+101
| |
* | Add initial proxy supportbptato2023-04-302-3/+10
| | | | | | | | For now, API-only.
* | loader: remove unused importbptato2023-04-301-1/+0
|/
* Loader: use curl_multibptato2023-04-282-108/+195
| | | | | Note: for now it's only used for http requests. The doRequest API still needs an async rework.
* Slightly improve request api (less crashes)bptato2023-02-052-5/+7
|