mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:37:45 +00:00
LibWeb: Add constructor to XMLHttpRequest IDL interface
This commit is contained in:
parent
8f8f7bfd0f
commit
13867600c3
2 changed files with 11 additions and 1 deletions
|
@ -30,6 +30,7 @@
|
|||
#include <AK/RefCounted.h>
|
||||
#include <AK/URL.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <LibWeb/Bindings/WindowObject.h>
|
||||
#include <LibWeb/Bindings/Wrappable.h>
|
||||
#include <LibWeb/DOM/EventTarget.h>
|
||||
#include <LibWeb/XHR/XMLHttpRequestEventTarget.h>
|
||||
|
@ -51,7 +52,14 @@ public:
|
|||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue