diff options
author | Kris Maglione <maglione.k@gmail.com> | 2010-10-03 14:20:28 -0400 |
---|---|---|
committer | Kris Maglione <maglione.k@gmail.com> | 2010-10-03 14:20:28 -0400 |
commit | 5c81791183d06ee67921f01a4579caa21bdf3325 (patch) | |
tree | 1cd5ab8963cc4335fa274f50d3d631b1c455fbf9 /common/content/marks.js | |
parent | c577b15ea6dc466877778ebbc81765c79fe6cfa7 (diff) | |
download | pentadactyl-5c81791183d06ee67921f01a4579caa21bdf3325.tar.gz |
Support marks on frameset pages.
Diffstat (limited to 'common/content/marks.js')
-rw-r--r-- | common/content/marks.js | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/common/content/marks.js b/common/content/marks.js index 19f7cc11..9f4c42af 100644 --- a/common/content/marks.js +++ b/common/content/marks.js @@ -36,8 +36,7 @@ const Marks = Module("marks", { return lmarks.concat(umarks).sort(function (a, b) String.localeCompare(a[0], b[0])); }, - // FIXME: Frameset - get localURI() window.content.document.documentURI, + get localURI() buffer.focusedFrame.document.documentURI, /** * Add a named mark for the current buffer, at its current position. @@ -49,17 +48,10 @@ const Marks = Module("marks", { * @param {string} mark The mark name. * @param {boolean} silent Whether to output error messages. */ - // TODO: add support for frameset pages add: function (mark, silent) { - let win = window.content; + let win = buffer.focusedFrame; let doc = win.document; - if (doc.body && doc.body instanceof HTMLFrameSetElement) { - if (!silent) - dactyl.echoerr("Marks support for frameset pages not implemented yet"); - return; - } - let x = win.scrollMaxX ? win.pageXOffset / win.scrollMaxX : 0; let y = win.scrollMaxY ? win.pageYOffset / win.scrollMaxY : 0; let position = { x: x, y: y }; |