about summary refs log tree commit diff stats
path: root/src/bindings/quickjs.nim
Commit message (Collapse)AuthorAgeFilesLines
* js: use Nim allocatorbptato2024-01-081-16/+30
|
* Fix some casing issuesbptato2024-01-061-1/+1
|
* Compile with styleCheck:usagesbptato2023-12-281-6/+6
| | | | much better
* dom: use JS_EvalFunction; add module fetching stubsbptato2023-12-251-0/+1
| | | | (still no module support in buffer...)
* bindings/quickjs: cint -> csize_tbptato2023-12-231-1/+2
| | | | | | cint was incorrect :/ Makes me wonder if maybe we should just use futhark after all...
* pager, container: add text selection/copyingbptato2023-12-031-0/+2
| | | | | | | | | | * Add select & copy selection functionality to container * Fix bug in generateSwapOutput where output could be misplaced because of zero-width cells * Add fromJSPromise, call runJSJobs in every iteration of the headed event loop * "await" pager actions that output a promise * Change default view source keybinding to `\'
* Get rid of clang 16 workaroundbptato2023-12-021-5/+14
| | | | | * bindings/quickjs: importc and use correct pointer types * add constcharp module for when it is unavoidable
* js: get rid of getJSValuebptato2023-12-021-1/+2
| | | | just use an UncheckedArray in the binding
* js: simplify toJSP0bptato2023-11-301-2/+6
| | | | | | | * Expose js_create_from_ctor from QuickJS and directly use that (instead of badly recreating it) * Do not call defineUnforgeable twice (it is inevitably called in toJSP0, so jsctor does not need it)
* Add jspropnames, CSSStyleDeclaration stubbptato2023-10-251-1/+5
|
* base64: reduce pointless re-coding using JSStringbptato2023-10-211-0/+11
| | | | | 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/+11
|
* dom: add document.all, misc fixesbptato2023-09-191-0/+1
| | | | | | | | * Fix an issue with Collection cache invalidation (we must invalidate collections of the parent node on insertion, so that it triggers a refresh). * Remove circular reference of document.document, now we use a function instead.
* bindings: fix JSInterruptHandler signaturebptato2023-09-151-1/+1
|
* javascript: misc. refactoringsbptato2023-08-241-1/+3
| | | | | | | | | | | | * Remove some unused properties from objects * Un-extern JSFunctionList * Remove js/javascript dependency from regex (the wrapper functions were rather pointless) * Remove setProperty (only toJS(Table) used it, but there we have to use defineProperty instead.) * Accordingly, use definePropertyCWE in toJS(Table) * Simplify fromJSTable (replace pointer arithmetic with UncheckedArray) * Reduce implicit `result' usage
* javascript: finish LegacyUnforgeable + misc fixesbptato2023-08-201-0/+11
| | | | | | | | Add jsuffget, jsuffunc for setting LegacyUnforgeable on functions. Misc fixes: * define LegacyUnforgeable properties for native object shims * replace some macros with templates
* javascript: update Events, misc fixes & additionsbptato2023-08-201-3/+15
| | | | | | | | | | | | | | Events: just implement the interfaces, no events are triggered yet. JS changes: * add LegacyUnforgeable * make consts enumerable * fix crash in isInstanceOf * fix destructor warnings * refactor registerType As a result, peakmem is now 1G+ on 1.6.14. It stays ~750M on 2.0.0. Hmm. Well, better upgrade to 2.0.0 I guess.
* Fixes & workarounds to compile on Nim 2.0.0bptato2023-08-011-1/+2
| | | | | | | | | | | | | | * 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.)
* Add libregexp header to libregexp bindingbptato2023-07-041-9/+4
|
* Fix CastSize warningsbptato2023-07-031-2/+2
| | | | Introduced by 1.6.14. Warns of undefined behavior.
* Remove getClassID hackbptato2023-06-271-0/+1
| | | | Add a JS_GetClassID function to QJS instead.
* Working Nim-QuickJS GC integrationbptato2023-06-241-0/+2
| | | | I believe this works correctly. Hopefully I'm not wrong.
* Fix module loading bugsbptato2023-06-221-0/+2
|
* Include QuickJS sources in the repositorybptato2023-06-221-17/+2
| | | | Taken from txiki.js, so it includes zamofex's top-level await patch.
* Rework JS exception systembptato2023-06-191-0/+11
| | | | | Now we use Result for passing exceptions to JS. As a result, we can finally get rid of the .jserr pragma.
* Simplify request.json, remove unused bindingsbptato2023-06-091-2/+3
|
* Add module loading to clientbptato2023-06-011-0/+3
| | | | Files only, for now.
* Some bindingsbptato2023-05-241-1/+10
|
* WIP fetchbptato2023-04-301-0/+5
|
* quickjs: make JSValue distinct on 32-bitbptato2023-02-051-2/+4
|
* Remove non-existing JS type uint64bptato2022-12-311-1/+0
| | | | Oops.
* Add promise support to JSbptato2022-12-311-0/+6
|
* dom: fix collection cachingbptato2022-12-271-0/+1
| | | | Use ids instead of pure pointers, so we can utilize the JS finalizer.
* Remove todobptato2022-12-211-1/+0
|
* pager: proxy values in container; js: bugfixesbptato2022-12-201-1/+3
| | | | Also, a little bonus: w3m keybindings
* Fix JS_GetPropertyNames bindingsbptato2022-12-201-1/+1
|
* More work on DOM (incl. bugfixes)bptato2022-12-191-0/+1
|
* Add JS support to documentsbptato2022-12-181-4/+31
|
* Rewrite buffer/pager for multi-processingbptato2022-11-191-1/+1
|
* Binding & macro refactoringsbptato2022-10-011-6/+22
|
* Rename jsget/jsset to jsfget/jsfset for functionsbptato2022-09-161-1/+1
| | | | | The original idea was to use the same pragmas as object members, but unfortunately this doesn't seem to work consistently after all.
* Tweaks/bugfixes for armbptato2022-09-141-1/+1
|
* More JS bindingsbptato2022-09-131-35/+53
|
* Add JS binding generationbptato2022-09-121-34/+262
|
* Link to libcurlbptato2022-07-241-22/+25
|
* Add search functionbptato2022-07-221-0/+3
| | | | | Uses libregexp from QuickJS. Incremental search is quite hacky for now, but overall it seems to work OK.
* Initial QuickJS integrationbptato2022-07-131-0/+129