about summary refs log tree commit diff stats
path: root/src/html/event.nim
Commit message (Collapse)AuthorAgeFilesLines
* js: proper distinction between Opt/Optionbptato2024-03-241-5/+6
| | | | | | | | | | | | | | | | 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.
* js: merge some type modules into jstypesbptato2024-01-111-1/+1
| | | | They only had type definitions, no need to put them in separate modules.
* Use std/* imports everywherebptato2024-01-071-2/+2
|
* event: remove ctx from CustomEventbptato2023-12-031-13/+9
| | | | | Instead, make finalizers optionally pass their runtime for resource deallocation.
* buffer: add DOMContentLoaded, misc event improvementsbptato2023-11-271-3/+3
| | | | | | | * Add DOMContentLoaded * Re-use the same event object for all elements * Reshape if an event was fired * Reshape on setTimeout/setInterval fired
* 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/
* event: use JSDictbptato2023-09-091-20/+18
|
* buffer: basic click event supportbptato2023-08-311-7/+15
| | | | | | | 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: factor out fromJSbptato2023-08-291-0/+1
|
* refactor: Result[T, JSError] -> JSResult[T]bptato2023-08-281-2/+2
|
* javascript: refactorbptato2023-08-281-0/+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: update Events, misc fixes & additionsbptato2023-08-201-1/+224
| | | | | | | | | | | | | | 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.
* Event: add some properties, js: add defineConstsbptato2023-07-041-2/+17
|
* Fix compilation failurebptato2023-07-031-1/+2
|
* Add XHR/Event stubsbptato2023-07-021-0/+15