summaryrefslogtreecommitdiff
path: root/common/content/events.js
diff options
context:
space:
mode:
authorKris Maglione <maglione.k@gmail.com>2011-03-02 02:50:21 -0500
committerKris Maglione <maglione.k@gmail.com>2011-03-02 02:50:21 -0500
commit28d1c1bcade5d1cff91bafc32f5b9a28b32a3fcd (patch)
treeeeeca1552bda0e86ff7b080e88f6034a837329d9 /common/content/events.js
parent8621e7f79f77f36684c49f871a58a5f31c2dd459 (diff)
downloadpentadactyl-28d1c1bcade5d1cff91bafc32f5b9a28b32a3fcd.tar.gz
Fix flashblock plugin event magic.
Diffstat (limited to 'common/content/events.js')
-rw-r--r--common/content/events.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/content/events.js b/common/content/events.js
index 93af7226..a7feeafa 100644
--- a/common/content/events.js
+++ b/common/content/events.js
@@ -301,7 +301,7 @@ var EventHive = Class("EventHive", Contexts.Hive, {
* @param {boolean} capture When true, listen during the capture
* phase, otherwise during the bubbling phase.
*/
- listen: function (target, event, callback, capture) {
+ listen: function (target, event, callback, capture, allowUntrusted) {
if (isObject(event))
var [self, events] = [event, event[callback || "events"]];
else
@@ -311,7 +311,8 @@ var EventHive = Class("EventHive", Contexts.Hive, {
let args = [Cu.getWeakReference(target),
event,
this.wrapListener(callback, self),
- capture];
+ capture,
+ allowUntrusted];
target.addEventListener.apply(target, args.slice(1));
this.sessionListeners.push(args);
@@ -331,7 +332,7 @@ var EventHive = Class("EventHive", Contexts.Hive, {
this.sessionListeners = this.sessionListeners.filter(function (args) {
if (target == null || args[0].get() == target && args[1] == event && args[2] == callback && args[3] == capture) {
args[0].get().removeEventListener.apply(args[0].get(), args.slice(1));
- return true;
+ return false;
}
return !args[0].get();
});