1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-01-30 11:25:46 +01:00

Automatically track and remove long-lived event listeners.

This commit is contained in:
Kris Maglione
2009-11-13 16:12:50 -05:00
parent 569bef73bd
commit a4dced6911
5 changed files with 84 additions and 77 deletions

View File

@@ -15,10 +15,6 @@ const Marks = Module("marks", {
this._urlMarks = storage.newMap("url-marks", { store: true, privateData: true });
this._pendingJumps = [];
var appContent = document.getElementById("appcontent");
if (appContent)
appContent.addEventListener("load", this.closure._onPageLoad, true);
},
/**
@@ -240,6 +236,11 @@ const Marks = Module("marks", {
isLocalMark: function isLocalMark(mark) /^['`a-z]$/.test(mark),
isURLMark: function isURLMark(mark) /^[A-Z0-9]$/.test(mark),
}, {
events: function () {
let appContent = document.getElementById("appcontent");
if (appContent)
events.addSessionListener(appContent, "load", this.closure._onPageLoad, true);
},
mappings: function () {
var myModes = config.browserModes;