mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-28 07:13:20 +00:00
Bug 847591 - Paris binding for CommandEvent, r=peterv
--HG-- extra : rebase_source : f633d3c91764c38f7cec9a9e1c192773e3ea6f7f
This commit is contained in:
parent
dee16c2cf0
commit
e773485a9c
@ -18,6 +18,7 @@ nsDOMCommandEvent::nsDOMCommandEvent(mozilla::dom::EventTarget* aOwner,
|
||||
} else {
|
||||
mEventIsInternal = true;
|
||||
}
|
||||
SetIsDOMBinding();
|
||||
}
|
||||
|
||||
nsDOMCommandEvent::~nsDOMCommandEvent()
|
||||
|
@ -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__
|
||||
|
@ -159,6 +159,10 @@ DOMInterfaces = {
|
||||
'resultNotAddRefed': [ 'item' ]
|
||||
},
|
||||
|
||||
'CommandEvent': {
|
||||
'nativeType': 'nsDOMCommandEvent',
|
||||
},
|
||||
|
||||
'CSS': {
|
||||
'concrete': False,
|
||||
},
|
||||
|
14
dom/webidl/CommandEvent.webidl
Normal file
14
dom/webidl/CommandEvent.webidl
Normal 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);
|
||||
};
|
@ -27,6 +27,7 @@ webidl_files = \
|
||||
CFStateChangeEvent.webidl \
|
||||
CharacterData.webidl \
|
||||
ClientRectList.webidl \
|
||||
CommandEvent.webidl \
|
||||
Comment.webidl \
|
||||
CSS.webidl \
|
||||
CSSPrimitiveValue.webidl \
|
||||
|
Loading…
Reference in New Issue
Block a user