Commit Graph

14 Commits

Author SHA1 Message Date
Linus Groh
edfef8e2f5 Everywhere: Rename WrapperGenerator to BindingsGenerator
This code generator no longer creates JS wrappers for platform objects
in the old sense, instead they're JS objects internally themselves.
Most of what we generate now are prototypes - which can be seen as
bindings for the internal C++ methods implementing getters, setters, and
methods - as well as object constructors, i.e. bindings for the internal
create_with_global_object() method.

Also tweak the naming of various CMake glue code existing around this.
2022-09-21 23:06:08 +01:00
Luke Wilde
54454952e0 LibWeb: Capture <script> element's node document on execution
Step 1 of the spec is to capture the <script> element's node document
into a local variable.

When I originally implemented this, I thought this was not necessary.
However, I realised that the script that runs can adopt the current
script element into a different document, meaning step 5.4 and 6 then
operate on the incorrect document.

Covered by this WPT: 7b0ebaccc6/html/semantics/scripting-1/the-script-element/moving-between-documents-during-evaluation.html
2021-12-21 13:50:00 -08:00
Linus Groh
f8387dea26 LibWeb: Implement TextEncoder.prototype.encoding 2021-12-12 20:58:36 +01:00
Linus Groh
f37d00c07b LibWeb: Implement TextEncoder.prototype.encode() 2021-12-12 20:58:36 +01:00
Luke Wilde
2f426765a6 LibWeb: Add support HTMLScriptElement.supports
See 33ff054a6c
2021-09-03 23:11:58 +02:00
Luke Wilde
1d8f8ea5b1 LibWeb: Add initial support for AbortController and AbortSignal
The DOM specification says that the primary use case for these is to
give Promises abort semantics. It is also a prerequisite for Fetch,
as it is used to make Fetch abortable.
a
2021-09-02 09:12:17 +02:00
Adam Hodgen
47bfd366a8 LibWeb: Fix syntax for Table test
The parser fixes this by inserting the <tr> tags, but for this test it's
better to have perfect syntax - we're not testing the parser here.
2021-07-11 14:14:01 +02:00
Ali Mohammad Pur
d897abf4c2 LibWeb: Implement test-web in terms of LibTest/JavaScriptTestRunner
This deduplicates the test-js copy-ism :^)
2021-05-18 18:48:15 +01:00
Adam Hodgen
dc9995a5ba LibWeb: Add tests for HTMLTableElement attributes
These tests aim to exercise all attributes on <html> elements, including
all edge cases.
2021-05-09 18:38:34 +02:00
Adam Hodgen
737f6e97b2 LibWeb: Fix nodeName attribute in tests
Commit 19731fc14c (#6864) made all nodeName attributes on HTML elements
uppercased. This change fixes that in all HTML & DOM tests.
2021-05-09 18:38:34 +02:00
Linus Groh
2b0c361d04 Everywhere: Fix a bunch of typos 2021-04-18 10:30:03 +02:00
Brian Gianforcaro
988c23fff0 LibWeb: Add implementation of Node.compareDocumentPosition()
While looking into getting Duck Duck Go loading further in the
Browser, I noticed that it was complaining about the missing
method Node.compareDocumentPosition.

This change implements as much of the DOM spec as possible
with the current implementation of the DOM to date. The
implementation is validated by new tests in the Node.js.
2021-04-11 09:40:06 +02:00
Brian Gianforcaro
0f8932d7ab LibWeb: Connect existing implementation of Node::is_connected to JS.
I was looking at implementing something else, and saw this was low
hanging fruit, that brings the browser closer to standards conformance.

Add a basic test as well to validate it's implementation.
2021-04-11 09:40:06 +02:00
Andreas Kling
13d7c09125 Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00