about summary refs log tree commit diff stats
path: root/src/html/env.nim
Commit message (Collapse)AuthorAgeFilesLines
* window: inherit from EventTargetbptato2023-10-251-2/+3
|
* base64: reduce pointless re-coding using JSStringbptato2023-10-211-2/+4
| | | | | We now expose some functions from QuickJS to interact with JavaScript strings without re-encoding them into UTF-8.
* javascript: add TextEncoder, TextDecoderbptato2023-10-211-0/+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-2/+4
| | | | | * merge dom.console & client.Console * move client-specific stuff out of Console (into callbacks when necessary)
* move around more modulesbptato2023-09-141-5/+5
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* fetch: use JSDictbptato2023-09-091-1/+1
|
* dom: align some return values with their webidlbptato2023-09-081-2/+2
| | | | | Certain functions were returning types that do not align with the WebIDL defined in the dom standard.
* fetch: allow string input, allow init dictionarybptato2023-09-081-2/+4
|
* Add btoa, atobbptato2023-09-071-0/+7
|
* javascript: refactorbptato2023-08-281-1/+2
| | | | | | | Split out parts of the JS module, because it was starting to confuse the compiler a little. (Peakmem is back at 750M. Interesting.)
* javascript: de-ref some interfacesbptato2023-08-281-25/+25
| | | | | | | Also, make ActionMap use getters/hasprop instead of a table copy. peakmem remains up +200M at 950M after commit 9991bd3393483158ab0d1b9d995f695dee3c65dc. :(
* dom: add some null checks for windowbptato2023-08-231-1/+1
| | | | | | | Now that we have established that window *can* be nil. (Though the document.location window null check is probably unnecessary, because it is only called from scripts... but better safe than sorry.)
* javascript: finish LegacyUnforgeable + misc fixesbptato2023-08-201-1/+3
| | | | | | | | Add jsuffget, jsuffunc for setting LegacyUnforgeable on functions. Misc fixes: * define LegacyUnforgeable properties for native object shims * replace some macros with templates
* htmlparser: decouple from DOMbptato2023-07-091-1/+1
| | | | | Instead of directly appending nodes to the DOM, use a DOMBuilder interface.
* Add XHR/Event stubsbptato2023-07-021-1/+5
|
* Factor out headers into separate modulebptato2023-07-011-0/+2
|
* Add window.locationbptato2023-06-291-4/+8
| | | | Note: setters do not work yet.
* Working Nim-QuickJS GC integrationbptato2023-06-241-1/+1
| | | | I believe this works correctly. Hopefully I'm not wrong.
* Reject fetch promise on network errorbptato2023-06-191-1/+1
| | | | Instead of setting the non-standard res variable.
* Rework JS exception systembptato2023-06-191-0/+2
| | | | | 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-151-0/+2
| | | | | Now a promise returning nil doesn't just leave the rest of the then chain hanging. Hooray.
* Add support for width, height media querybptato2023-06-071-1/+3
|
* Add support for canvas and multipartbptato2023-06-051-0/+17
| | | | | | | | | | | | | | | 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...)
* Add module loading to clientbptato2023-06-011-1/+1
| | | | Files only, for now.
* Add setTimeout, setInterval to windowbptato2023-06-011-16/+54
|
* WIP fetchbptato2023-04-301-0/+6
|
* client, pager, dom, ...: better error handlingbptato2023-01-041-1/+3
| | | | Now the browser shouldn't completely die when a buffer crashes.
* dom: add better attribute reflectionbptato2023-01-021-5/+3
| | | | | Instead of creating a new function for each attribute, use a single magic function for reflected attributes.
* DOM: implement many new methodsbptato2022-12-261-0/+3
|
* dom: add navigator objectbptato2022-12-261-0/+46
|
* More DOM workbptato2022-12-191-0/+2
|
* Add JS support to documentsbptato2022-12-181-0/+26
689' href='#n689'>689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752