1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-06 15:44:12 +01:00

Replace usage of getPreventDefault with defaultPrevented.

The former is now deprecated #726933.
This commit is contained in:
Doug Kearns
2013-10-30 23:12:02 +11:00
parent cf93578a84
commit ef30e3cc47
4 changed files with 5 additions and 5 deletions

View File

@@ -660,7 +660,7 @@ var Events = Module("events", {
// the command-line has focus // the command-line has focus
// TODO: ...help me...please... // TODO: ...help me...please...
keypress: function onKeyPress(event) { keypress: function onKeyPress(event) {
event.dactylDefaultPrevented = event.getPreventDefault(); event.dactylDefaultPrevented = event.defaultPrevented;
let duringFeed = this.duringFeed || []; let duringFeed = this.duringFeed || [];
this.duringFeed = []; this.duringFeed = [];

View File

@@ -139,7 +139,7 @@ var ProcessorStack = Class("ProcessorStack", {
if (result === Events.PASS_THROUGH) if (result === Events.PASS_THROUGH)
events.feedevents(null, this.keyEvents, { skipmap: true, isMacro: true, isReplay: true }); events.feedevents(null, this.keyEvents, { skipmap: true, isMacro: true, isReplay: true });
else { else {
let list = this.events.filter(e => e.getPreventDefault() && !e.dactylDefaultPrevented); let list = this.events.filter(e => e.defaultPrevented && !e.dactylDefaultPrevented);
if (result === Events.PASS) if (result === Events.PASS)
events.dbg("PASS THROUGH: " + list.slice(0, length).filter(e => e.type === "keypress").map(DOM.Event.closure.stringify)); events.dbg("PASS THROUGH: " + list.slice(0, length).filter(e => e.type === "keypress").map(DOM.Event.closure.stringify));
@@ -190,7 +190,7 @@ var ProcessorStack = Class("ProcessorStack", {
processors.push(res); processors.push(res);
} }
events.dbg("RESULT: " + event.getPreventDefault() + " " + this._result(result)); events.dbg("RESULT: " + event.defaultPrevented + " " + this._result(result));
events.dbg("ACTIONS: " + actions.length + " " + this.actions.length); events.dbg("ACTIONS: " + actions.length + " " + this.actions.length);
events.dbg("PROCESSORS:", processors, "\n"); events.dbg("PROCESSORS:", processors, "\n");

View File

@@ -149,7 +149,7 @@ var MOW = Module("mow", {
events: { events: {
click: function onClick(event) { click: function onClick(event) {
if (event.getPreventDefault()) if (event.defaultPrevented)
return; return;
const openLink = function openLink(where) { const openLink = function openLink(where) {

View File

@@ -1367,7 +1367,7 @@ var DOM = Class("DOM", {
.dispatchDOMEventViaPresShell(target, event, true); .dispatchDOMEventViaPresShell(target, event, true);
else { else {
target.dispatchEvent(event); target.dispatchEvent(event);
return !event.getPreventDefault(); return !event.defaultPrevented;
} }
} }
catch (e) { catch (e) {