mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 01:50:24 +00:00
LibWeb: Add constructor to XMLHttpRequest IDL interface
This commit is contained in:
parent
8f8f7bfd0f
commit
13867600c3
Notes:
sideshowbarker
2024-07-18 22:10:24 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/13867600c3d Pull-request: https://github.com/SerenityOS/serenity/pull/5391
2 changed files with 11 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
||||||
#include <AK/RefCounted.h>
|
#include <AK/RefCounted.h>
|
||||||
#include <AK/URL.h>
|
#include <AK/URL.h>
|
||||||
#include <AK/Weakable.h>
|
#include <AK/Weakable.h>
|
||||||
|
#include <LibWeb/Bindings/WindowObject.h>
|
||||||
#include <LibWeb/Bindings/Wrappable.h>
|
#include <LibWeb/Bindings/Wrappable.h>
|
||||||
#include <LibWeb/DOM/EventTarget.h>
|
#include <LibWeb/DOM/EventTarget.h>
|
||||||
#include <LibWeb/XHR/XMLHttpRequestEventTarget.h>
|
#include <LibWeb/XHR/XMLHttpRequestEventTarget.h>
|
||||||
|
@ -51,7 +52,14 @@ public:
|
||||||
|
|
||||||
using WrapperType = Bindings::XMLHttpRequestWrapper;
|
using WrapperType = Bindings::XMLHttpRequestWrapper;
|
||||||
|
|
||||||
static NonnullRefPtr<XMLHttpRequest> create(DOM::Window& window) { return adopt(*new XMLHttpRequest(window)); }
|
static NonnullRefPtr<XMLHttpRequest> create(DOM::Window& window)
|
||||||
|
{
|
||||||
|
return adopt(*new XMLHttpRequest(window));
|
||||||
|
}
|
||||||
|
static NonnullRefPtr<XMLHttpRequest> create_with_global_object(Bindings::WindowObject& window)
|
||||||
|
{
|
||||||
|
return XMLHttpRequest::create(window.impl());
|
||||||
|
}
|
||||||
|
|
||||||
virtual ~XMLHttpRequest() override;
|
virtual ~XMLHttpRequest() override;
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
interface XMLHttpRequest : XMLHttpRequestEventTarget {
|
interface XMLHttpRequest : XMLHttpRequestEventTarget {
|
||||||
|
|
||||||
|
constructor();
|
||||||
|
|
||||||
const unsigned short UNSENT = 0;
|
const unsigned short UNSENT = 0;
|
||||||
const unsigned short OPENED = 1;
|
const unsigned short OPENED = 1;
|
||||||
const unsigned short HEADERS_RECEIVED = 2;
|
const unsigned short HEADERS_RECEIVED = 2;
|
||||||
|
|
Loading…
Reference in a new issue