about summary refs log tree commit diff stats
path: root/src/js/fromjs.nim
Commit message (Collapse)AuthorAgeFilesLines
* config: clean up/simplifybptato2024-03-171-4/+6
| | | | | | | | | * Parse the default config at runtime. There's no significant performance difference, but this makes it much less painful to write config code. * Add better error reporting * Make fromJS2 easier to use * Unquote ChaPaths while parsing config
* quickjs: reduce diff with upstreambptato2024-03-021-5/+0
| | | | | | * the uint8array thing is probably from txiki.js, but we never used it * upstream now has JS_GetClassID, importing that instead... (so this commit won't build :/)
* regex: re-work compileSearchRegexbptato2024-02-171-16/+7
| | | | | | | I've gotten tired of not being able to search for forward slashes. Now it works like in vim, and you can also set default ignore case in the config.
* js: fix fromJSEnumbptato2024-02-081-6/+14
| | | | std enum parsing uses Nim ident matching rules, which is incorrect here.
* js: small improvementsbptato2024-01-171-1/+3
| | | | | * turn JSFuncGenerator into a ref object (it's faster this way) * remove strformat dependency
* js: merge some type modules into jstypesbptato2024-01-111-7/+5
| | | | They only had type definitions, no need to put them in separate modules.
* Use std/* imports everywherebptato2024-01-071-5/+5
|
* Compile with styleCheck:usagesbptato2023-12-281-1/+1
| | | | much better
* pager, container: add text selection/copyingbptato2023-12-031-0/+25
| | | | | | | | | | * 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 `\'
* fromjs: fix fromJSOption with nilbptato2023-11-211-1/+1
| | | | Use option() instead of some()
* js: refine isInstanceOf check in functionsbptato2023-10-251-4/+25
| | | | Special case the global object, check for inheritance, etc.
* fromjs: update FromJSAllowedTbptato2023-10-211-1/+2
|
* fromjs: remove IsNumber check from float, remove unused functionsbptato2023-10-211-21/+0
|
* fromJSInt: do not fail if not IsNumberbptato2023-10-211-2/+0
| | | | to match standard behavior (e.g. accept null as int, etc)
* base64: reduce pointless re-coding using JSStringbptato2023-10-211-0/+5
| | | | | 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/+32
|
* move around more modulesbptato2023-09-141-1/+1
| | | | | | | | | | * ips -> io/ * loader related stuff -> loader/ * tempfile -> extern/ * buffer, forkserver -> server/ * lineedit, window -> display/ * cell -> types/ * opt -> types/
* javascript: add JSDict typebptato2023-09-091-1/+16
| | | | And use that in extern().
* buffer: basic click event supportbptato2023-08-311-3/+14
| | | | | | | Mostly a proof of concept. Just bubble it unconditionally for now and never prevent default. Also, fix fromJSFunction by Dup'ing its closure JSValue.
* javascript: fix fromJSFunction, simplify setOpaquebptato2023-08-301-1/+3
| | | | | | * fromJSFunction: dup the value, so that it cannot go out of context. * setOpaque no longer calls GC_ref, so no need for it to be generic instead of just taking a pointer.
* javascript: factor out fromJSbptato2023-08-291-0/+457