Bug 847590 - Paris binding for BeforeUnloadEvent, r=peterv

--HG--
extra : rebase_source : d249e7a7e61c39ccba52a10234e2260b048c941d
This commit is contained in:
Olli Pettay 2013-03-26 13:45:39 +02:00
parent 8b28e5b8f1
commit fa2ed308e5
4 changed files with 27 additions and 1 deletions

View File

@ -8,6 +8,7 @@
#include "nsIDOMBeforeUnloadEvent.h"
#include "nsDOMEvent.h"
#include "mozilla/dom/BeforeUnloadEventBinding.h"
class nsDOMBeforeUnloadEvent : public nsDOMEvent,
public nsIDOMBeforeUnloadEvent
@ -15,7 +16,15 @@ class nsDOMBeforeUnloadEvent : public nsDOMEvent,
public:
nsDOMBeforeUnloadEvent(mozilla::dom::EventTarget* aOwner,
nsPresContext* aPresContext, nsEvent* aEvent)
: nsDOMEvent(aOwner, aPresContext, aEvent) {}
: nsDOMEvent(aOwner, aPresContext, aEvent)
{
SetIsDOMBinding();
}
virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope)
{
return mozilla::dom::BeforeUnloadEventBinding::Wrap(aCx, aScope, this);
}
NS_DECL_ISUPPORTS_INHERITED

View File

@ -126,6 +126,10 @@ DOMInterfaces = {
'concrete': False,
},
'BeforeUnloadEvent': {
'nativeType': 'nsDOMBeforeUnloadEvent',
},
'BiquadFilterNode': {
'resultNotAddRefed': [ 'frequency', 'q', 'gain' ],
'wrapperCache': False

View File

@ -0,0 +1,12 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* For more information on this interface, please see
* http://www.whatwg.org/specs/web-apps/current-work/#beforeunloadevent
*/
interface BeforeUnloadEvent : Event {
attribute DOMString returnValue;
};

View File

@ -21,6 +21,7 @@ webidl_files = \
AudioParam.webidl \
AudioSourceNode.webidl \
BatteryManager.webidl \
BeforeUnloadEvent.webidl \
BiquadFilterNode.webidl \
Blob.webidl \
CanvasRenderingContext2D.webidl \