mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-20 15:27:32 +09:00
Issue #595 - Implement window.event
This MSIE extension is still technically part of the standard*, although its use is discouraged. This API will also likely never go away based on some comments at this issue on MDN content**. Note that this uses a different approach for getting the inner window. * https://dom.spec.whatwg.org/#interface-window-extensions ** https://github.com/mdn/content/issues/21848 Spec PR: https://github.com/whatwg/dom/pull/407 Spec discussion: https://github.com/whatwg/dom/issues/334 Partially based on https://bugzilla.mozilla.org/show_bug.cgi?id=218415
This commit is contained in:
parent
8e6d730463
commit
31283d993b
10 changed files with 110 additions and 6 deletions
|
|
@ -194,6 +194,10 @@ protected:
|
|||
// we have what it takes to do so.
|
||||
void MaybeCreateDoc();
|
||||
|
||||
// The event dispatch code sets and unsets this while keeping
|
||||
// the event object alive.
|
||||
nsIDOMEvent* mEvent;
|
||||
|
||||
public:
|
||||
inline bool IsLoadingOrRunningTimeout() const;
|
||||
|
||||
|
|
@ -789,6 +793,17 @@ public:
|
|||
return mInnerObjectsFreed;
|
||||
}
|
||||
|
||||
// Sets the event for window.event. Does NOT take ownership, so
|
||||
// the caller is responsible for clearing the event before the
|
||||
// event gets deallocated. Pass nullptr to set window.event to
|
||||
// undefined. Returns the previous value.
|
||||
nsIDOMEvent* SetEvent(nsIDOMEvent* aEvent)
|
||||
{
|
||||
nsIDOMEvent* old = mEvent;
|
||||
mEvent = aEvent;
|
||||
return old;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether this window is a secure context.
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue