aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorStephen Blott2015-04-25 07:06:31 +0100
committerStephen Blott2015-04-25 07:06:31 +0100
commit9100b1d48aa9c09d792d9e2c9251e6a6c62f81bf (patch)
treee005bacd529ec8efa63243b45225051fc9af3417 /lib
parentef44d0ff49cec17a758b65c10ba4c0ecbc0c2ece (diff)
parentbfa6c88b41acac4c98d06f324f25f8bb7b328614 (diff)
downloadvimium-9100b1d48aa9c09d792d9e2c9251e6a6c62f81bf.tar.bz2
Merge branch 'vomnibar-in-main-window' into vomnibar-in-main-window-merge
Conflicts: background_scripts/main.coffee content_scripts/vimium_frontend.coffee
Diffstat (limited to 'lib')
-rw-r--r--lib/dom_utils.coffee6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee
index 0231f994..efb125f6 100644
--- a/lib/dom_utils.coffee
+++ b/lib/dom_utils.coffee
@@ -27,6 +27,12 @@ DomUtils =
removeElement: (el) -> el.parentNode.removeChild el
#
+ # Test whether the current frame is the top/main frame.
+ #
+ isTopFrame: ->
+ window.top == window.self
+
+ #
# Takes an array of XPath selectors, adds the necessary namespaces (currently only XHTML), and applies them
# to the document root. The namespaceResolver in evaluateXPath should be kept in sync with the namespaces
# here.