Bug 847591 - Paris binding for CommandEvent, r=peterv

--HG--
extra : rebase_source : f633d3c91764c38f7cec9a9e1c192773e3ea6f7f
This commit is contained in:
Olli Pettay 2013-03-13 23:05:32 +02:00
parent dee16c2cf0
commit e773485a9c
5 changed files with 35 additions and 0 deletions

View File

@ -18,6 +18,7 @@ nsDOMCommandEvent::nsDOMCommandEvent(mozilla::dom::EventTarget* aOwner,
} else {
mEventIsInternal = true;
}
SetIsDOMBinding();
}
nsDOMCommandEvent::~nsDOMCommandEvent()

View File

@ -8,6 +8,7 @@
#include "nsIDOMCommandEvent.h"
#include "nsDOMEvent.h"
#include "mozilla/dom/CommandEventBinding.h"
class nsDOMCommandEvent : public nsDOMEvent,
public nsIDOMCommandEvent
@ -24,6 +25,20 @@ public:
// Forward to base class
NS_FORWARD_TO_NSDOMEVENT
virtual JSObject* WrapObject(JSContext* aCx, JSObject* aScope)
{
return mozilla::dom::CommandEventBinding::Wrap(aCx, aScope, this);
}
void InitCommandEvent(const nsAString& aType,
bool aCanBubble,
bool aCancelable,
const nsAString& aCommand,
mozilla::ErrorResult& aRv)
{
aRv = InitCommandEvent(aType, aCanBubble, aCancelable, aCommand);
}
};
#endif // nsDOMCommandEvent_h__

View File

@ -159,6 +159,10 @@ DOMInterfaces = {
'resultNotAddRefed': [ 'item' ]
},
'CommandEvent': {
'nativeType': 'nsDOMCommandEvent',
},
'CSS': {
'concrete': False,
},

View File

@ -0,0 +1,14 @@
/* -*- 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/.
*/
interface CommandEvent : Event {
readonly attribute DOMString? command;
void initCommandEvent(DOMString type,
boolean canBubble,
boolean cancelable,
DOMString? command);
};

View File

@ -27,6 +27,7 @@ webidl_files = \
CFStateChangeEvent.webidl \
CharacterData.webidl \
ClientRectList.webidl \
CommandEvent.webidl \
Comment.webidl \
CSS.webidl \
CSSPrimitiveValue.webidl \