Commit graph

13 commits

Author SHA1 Message Date
Andreas Kling
ec0838b84e LibWeb: Implement HTMLElement.innerText closer to spec
And here's the wild part: instead of cloning WPT tests, import the
relevant WPT tests that this fixes into our own test suite.

This works by adding a small Ladybird-specific callback in
resources/testharnessreport.js (which is what that file is meant for!)

Note that these run as text tests, and so they must signal the runner
when they are done. Tests using the "usual" WPT harness should just
work, but tests that do something more freestyle will need manual
signaling if they are to be imported.

I've also increased the test timeout here from 30 to 60 seconds,
to accommodate the larger WPT-style tests.
2024-10-27 12:10:28 +01:00
circl
4ef0a123ea Meta: Remove home/anon directory from .prettierignore 2024-07-17 09:57:46 -06:00
davidot
6255ca4a42 LibJS: Add DisposableStack{, Prototype, Constructor}
Since the async parts of the spec are not stage 3 at this point we don't
add AsyncDisposableStack.
2023-01-23 09:56:50 +00:00
davidot
bff038411a LibJS: Add using declaration support in for and for of loops
The using declarations have kind of special behavior in for loops so
this is seperated.
2023-01-23 09:56:50 +00:00
davidot
541637e15a LibJS: Add using declaration support, RAII like operation in js
In this patch only top level and not the more complicated for loop using
statements are supported. Also, as noted in the latest meeting of tc39
async parts of the spec are not stage 3 thus not included.
2023-01-23 09:56:50 +00:00
davidot
3b1c3e574f LibJS: Handle empty named export
This is an export which looks like `export {} from "module"`, and
although it doesn't have any real export entries it should still add
"module" to the required modules to load.
2022-09-02 02:07:37 +01:00
Linus Groh
ed14ca16e5 Meta: Remove a couple of files from .prettierignore
These are now formatted just fine and no longer cause errors or
unintended formatting changes.
2022-08-26 20:03:38 +01:00
Linus Groh
f538df7572 CI: Bump prettier to latest version (2.4.1)
We didn't initially upgrade because it started to (incorrectly) see
files as strict mode and chokes on things that then would be syntax
errors - but we're starting to fall behind a bit, so I'd rather put
these files on the ignore list instead.
2021-11-21 01:18:23 +00:00
Timothy Flynn
1259dc3623 LibJS: Allow Unicode escape sequences in identifiers
For example, "property.br\u{64}wn" should resolve to "property.brown".

To support this behavior, this commit changes the Token class to hold
both the evaluated identifier name and a view into the original source
for the unevaluated name. There are some contexts in which identifiers
are not allowed to contain Unicode escape sequences; for example, export
statements of the form "export {} from foo.js" forbid escapes in the
identifier "from".

The test file is added to .prettierignore because prettier will replace
all escaped Unicode sequences with their unescaped value.
2021-08-19 23:49:25 +02:00
Anonymous
2822da8c8f LibJS: Correct behaviour of direct vs. indirect eval
eval only has direct access to the local scope when accessed through
the name eval. This includes locals named eval, because of course it
does.
2021-06-23 09:38:33 +01:00
Linus Groh
ee719c23d4 Meta: Add lint-prettier.sh
This is a script similar to the clang-format one to ensure prettier
formatting of most JavaScript files.
2020-12-27 21:25:27 +01:00
Linus Groh
5122f98198 Base+LibJS+LibWeb: Make prettier clean
Also use "// prettier-ignore" comments where necessary rather than
excluding whole files (via .prettierignore).
2020-12-27 21:25:27 +01:00
AnotherTest
54036d660a Meta: Move prettier config files to the root of the repository 2020-08-24 18:21:33 +02:00
Renamed from Libraries/LibJS/Tests/.prettierignore (Browse further)