Idan Horowitz
4d71f22673
LibWeb: Add the missing ProgressEvent IDL constructor
2021-10-01 20:14:45 +02:00
Andreas Kling
ed5c807c99
LibWeb: Allow passing a (String) body to XMLHttpRequest.send()
...
This patch implements the simplest form of send(body): strings.
2021-09-27 01:56:08 +02:00
Andreas Kling
0ee457dfdf
LibWeb: Provide a default DOM::EventTarget::dispatch_event()
...
All EventTarget subclasses except Window do the same exact thing in
their overrides, so let's just share an implementation in the base.
2021-09-25 23:36:43 +02:00
Andreas Kling
7ef4d75716
LibWeb: Implement XMLHttpRequest.getAllResponseHeaders()
2021-09-19 22:34:44 +02:00
Andreas Kling
ee8a1a9b3f
LibWeb: Keep XMLHttpRequest alive while handling load/error events
...
A weakly held XHR object is not guaranteed to remain alive after
running arbitrary JavaScript, so let's make sure we take a strong
reference in the ResourceLoader callbacks here.
2021-09-19 15:02:27 +02:00
Andreas Kling
398a95c3c9
LibWeb: Remove unnecessary WeakPtr creation in XMLHttpRequest::send()
2021-09-19 14:59:02 +02:00
Andreas Kling
dc8707527f
LibWeb: Implement XMLHttpRequest.onreadystatechange
2021-09-19 01:43:27 +02:00
Idan Horowitz
d6cfa34667
AK: Make URL::m_port an Optional<u16>, Expose raw port getter
...
Our current way of signalling a missing port with m_port == 0 was
lacking, as 0 is a valid port number in URLs.
2021-09-14 00:14:45 +02:00
Idan Horowitz
4629f2e4ad
LibWeb: Add the Web::URL namespace and move URLEncoder to it
...
This namespace will be used for all interfaces defined in the URL
specification, like URL and URLSearchParams.
This has the unfortunate side-effect of requiring us to use the fully
qualified AK::URL name whenever we want to refer to the AK class, so
this commit also fixes all such references.
2021-09-13 01:43:10 +02:00
Andreas Kling
19de6bb1cc
LibWeb+Browser: Add Debug menu action for toggling Same-Origin Policy
...
Sometimes it's useful to turn off the SOP for testing purposes.
Let's make that easy by having a Debug menu item for it. :^)
2021-09-12 02:13:28 +02:00
Andreas Kling
e1fb8bef09
LibWeb: Rename Document::complete_url() => parse_url()
...
This better matches the spec nomenclature.
2021-09-09 21:25:10 +02:00
Andreas Kling
90cdeebfb3
LibWeb: Rename DOM::Window::document() => associated_document()
...
Match the spec nomenclature.
2021-09-09 21:25:10 +02:00
Andreas Kling
d392349b6e
LibWeb: Add DOM::Window::page()
...
This helps us to get from a Window to the containing Page, without
clients having to go through Document.
2021-09-09 21:25:10 +02:00
Ali Mohammad Pur
97e97bccab
Everywhere: Make ByteBuffer::{create_*,copy}() OOM-safe
2021-09-06 01:53:26 +02:00
Andreas Kling
ba9d5c4d54
LibJS: Rename Function => FunctionObject
2021-06-27 22:36:04 +02:00
Gunnar Beutner
53d0150827
AK+Userland: Remove nullability feature for the ByteBuffer type
...
Nobody seems to use this particular feature, in fact there were some
bugs which were uncovered by removing operator bool.
2021-05-16 17:49:42 +02:00
Linus Groh
ebdeed087c
Everywhere: Use linusg@serenityos.org for my copyright headers
2021-04-22 22:51:19 +02:00
Brian Gianforcaro
1682f0b760
Everything: Move to SPDX license identifiers in all files.
...
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Timothy Flynn
0f47a23e8e
LibWeb: Set Cookie header on remaining resource requests
2021-04-15 09:46:49 +02:00
Linus Groh
57ead17d54
LibWeb: Implement XMLHttpRequest.getResponseHeader()
...
This lets jQuery's AJAX functionality progress further :^)
2021-04-03 16:34:34 +02:00
Linus Groh
288b90a297
LibWeb: Implement XMLHttpRequest.status
...
This lets jQuery's AJAX functionality progress further :^)
2021-04-03 16:34:34 +02:00
Linus Groh
e02270c5cc
LibWeb: Make XMLHttpRequest.open() work with relative URLs
2021-04-03 16:34:34 +02:00
Linus Groh
000ef96613
LibWeb: Pass optional status code to ResourceLoader callbacks
...
This is needed for XMLHttpRequest, and will certainly be useful for
other things, too.
2021-04-03 16:34:34 +02:00
Linus Groh
14058b6858
LibWeb: Use DOMException in XMLHttpRequest::send()
2021-02-20 09:14:19 +01:00
Linus Groh
70878290b9
LibWeb: Use DOMException in XMLHttpRequest::open()
2021-02-20 09:14:19 +01:00
Linus Groh
c4d8cce9a2
LibWeb: Use DOMException in XMLHttpRequest::set_request_header()
2021-02-20 09:14:19 +01:00
Andreas Kling
9de1253f44
LibWeb: Remove a whole bunch of unnecessary #includes
2021-02-10 09:13:29 +01:00
Luke
0a1226344a
LibWeb: Add XHREventTarget and have XHR inherit from it
2021-01-23 22:29:21 +01:00
Luke
4f2e154dbe
LibWeb: Flesh out existing XHR methods a bit more
...
This makes open, send and setRequestHeader a bit more spec compliant and
adds a bunch of FIXMEs for unimplemented parts.
2021-01-23 22:29:21 +01:00
Andreas Kling
5b91362d4e
LibWeb: Move XMLHttpRequest to separate XHR directory
...
In keeping with the one-directory-per-web-spec layout, let's move XHR
into its own clubhouse.
2021-01-23 11:51:36 +01:00