about summary refs log tree commit diff stats
path: root/src/html
Commit message (Collapse)AuthorAgeFilesLines
* dom: add outerHTML setterbptato2023-10-231-53/+143
| | | | Also, misc. refactorings
* Add innerHTML setterbptato2023-10-232-9/+66
| | | | yay
* dom: use same url in eval filename as in the console.log statementbptato2023-10-221-2/+2
|
* 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-192-2/+2
| | | | | | * rename module (window -> winattrs, to avoid conflict with env/window) * do not use result * remove unused cell_ratio
* Refactor Consolebptato2023-10-132-43/+6
| | | | | * merge dom.console & client.Console * move client-specific stuff out of Console (into callbacks when necessary)
* Use twtstr.join everywherebptato2023-10-012-2/+4
|
* Get rid of unicode.toLowerbptato2023-10-011-3/+3
| | | | | It was used by mistake in a hundred percent of the cases we were using it.
* Improve implicit form submissionbptato2023-09-301-10/+15
| | | | | | * Implement the "default button" part of the standard. * If the submitter is the form, formmethod may be called on it. Check if this is the case in the function, and if yes, return the form's method.
* client, timeout: simplifybptato2023-09-241-1/+1
| | | | | We don't use the generic feature of selectors, so just unify the client & buffer timeout types.
* fix size for some input typesbptato2023-09-221-1/+1
| | | | | | padToWidth should be called for all input types in InputWithSize. Also, they should be underlined by ua.css.
* buffer: support <a name=... for anchor navigationbptato2023-09-201-0/+9
|
* update chamebptato2023-09-193-2/+46
| | | | and with that, resolve the unknown input type issue
* dom: fix regressionbptato2023-09-191-1/+1
|
* dom: add document.all, misc fixesbptato2023-09-191-17/+63
| | | | | | | | * 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.
* dom: exclude password from exception logbptato2023-09-191-1/+3
|
* response: add blob() functionbptato2023-09-171-1/+1
|
* dom: fix incorrect iteration in descendantsbptato2023-09-141-2/+3
|
* Update submodulesbptato2023-09-142-2/+11
|
* move around more modulesbptato2023-09-143-9/+9
| | | | | | | | | | * 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
|
* fetch: use JSDictbptato2023-09-091-1/+1
|
* dom: align some return values with their webidlbptato2023-09-082-13/+13
| | | | | 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
|
* dom: set input type to text if not givenbptato2023-09-071-0/+2
| | | | | | | HTMLInputElement.inputString depends on inputType not being unknown. (Maybe we should move this logic out of the html parser module entirely and just set text as the default value...)
* twtstr: remove toLowerAscii2bptato2023-09-071-8/+10
|
* dom: fix previousElementSiblingbptato2023-09-011-2/+2
| | | | (again. ouch.)
* 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.
* dom: fix previous/nextElementSibling, add location stringifierbptato2023-08-311-12/+15
|
* javascript: factor out fromJSbptato2023-08-293-1/+4
|
* refactor: Result[T, DOMException] -> DOMResult[T]bptato2023-08-281-15/+15
|
* refactor: Result[T, JSError] -> JSResult[T]bptato2023-08-281-2/+2
|
* javascript: refactorbptato2023-08-284-4/+11
| | | | | | | 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-282-33/+36
| | | | | | | 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-232-5/+9
| | | | | | | 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.)
* DOMParser: use correct URLbptato2023-08-231-5/+11
| | | | | | | | Use current document's URL if window && window.document, otherwise default to about:blank. Also, it seems that passing nil to window is really necessary in some cases, so remove notes indicating otherwise.
* javascript: finish LegacyUnforgeable + misc fixesbptato2023-08-202-14/+16
| | | | | | | | 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-202-2/+236
| | | | | | | | | | | | | | 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.
* dom: remove dead codebptato2023-08-161-7/+0
|
* chadombuilder: implement restartbptato2023-08-151-0/+12
| | | | | Now pages (once again) do not break when a meta charset tag is defined. Hooray!
* Move HTML parsing into Chamebptato2023-08-157-4589/+5
| | | | Operation "modularize Chawan somewhat" part 2
* Move charsets into chakasubptato2023-08-144-6/+10
| | | | Operation "modularize Chawan somewhat" part 1
* Add mailcap, mime.types & misc refactoringsbptato2023-08-131-4/+5
| | | | | | | | * 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-27/+27
| | | | | | | | | | | | | | * 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.)
* htmlparser: replace stray insert callbptato2023-07-271-1/+1
|
* dom: fix hasChildbptato2023-07-271-1/+1
| | | | Return true instead of false when a node with nodeType was found.
* htmlparser: fix <th> not closing table cellsbptato2023-07-271-1/+1
| | | | | <th> should close table cells, but was missing from the table cell closing list for some reason.
* htmlparser: remove stray nil comparisonbptato2023-07-271-4/+3
|