mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
Issue #1587 - Part 5: Hook FetchObserver up to the Fetch API
This commit is contained in:
parent
6722d7f4b4
commit
3d2ca85edd
11 changed files with 399 additions and 75 deletions
|
|
@ -9,11 +9,13 @@
|
|||
|
||||
#include "mozilla/DOMEventTargetHelper.h"
|
||||
#include "mozilla/dom/FetchObserverBinding.h"
|
||||
#include "mozilla/dom/FetchSignal.h"
|
||||
|
||||
namespace mozilla {
|
||||
namespace dom {
|
||||
|
||||
class FetchObserver final : public DOMEventTargetHelper
|
||||
, public FetchSignal::Follower
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS_INHERITED
|
||||
|
|
@ -22,7 +24,7 @@ public:
|
|||
static bool
|
||||
IsEnabled(JSContext* aCx, JSObject* aGlobal);
|
||||
|
||||
FetchObserver(nsIGlobalObject* aGlobal, FetchState aState);
|
||||
FetchObserver(nsIGlobalObject* aGlobal, FetchSignal* aSignal);
|
||||
|
||||
JSObject*
|
||||
WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
|
||||
|
|
@ -34,6 +36,12 @@ public:
|
|||
IMPL_EVENT_HANDLER(requestprogress);
|
||||
IMPL_EVENT_HANDLER(responseprogress);
|
||||
|
||||
void
|
||||
Aborted() override;
|
||||
|
||||
void
|
||||
SetState(FetchState aState);
|
||||
|
||||
private:
|
||||
~FetchObserver() = default;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue