1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 04:07:59 +01:00

Avoid storing strong references to DOM nodes.

This commit is contained in:
Kris Maglione
2010-10-03 15:36:46 -04:00
parent 89a3a36047
commit 4adf8d8b19
2 changed files with 16 additions and 11 deletions

View File

@@ -440,10 +440,13 @@ const Buffer = Module("buffer", {
/**
* @property {Window} Returns the currently focused frame.
*/
get focusedFrame()
(dactyl.has("tabs") ? tabs.localStore : this.localStore).focusedFrame,
set focusedFrame(frame)
(dactyl.has("tabs") ? tabs.localStore : this.localStore).focusedFrame = frame,
get focusedFrame() {
let frame = (dactyl.has("tabs") ? tabs.localStore : this.localStore).focusedFrame;
return frame && frame.get();
},
set focusedFrame(frame) {
(dactyl.has("tabs") ? tabs.localStore : this.localStore).focusedFrame = Cu.getWeakReference(frame);
},
/**
* Returns the currently selected word. If the selection is