aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dom_utils.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-03-17 12:06:15 +0000
committerStephen Blott2015-03-17 12:06:15 +0000
commit4399e2e4fffc4faba9f1505dfc0ad3150a948632 (patch)
tree078d0ad4e226372fac0a93bb56f21259df1a0c1d /lib/dom_utils.coffee
parent8bc811aae1118e28faa7c17e67b039c67f637274 (diff)
downloadvimium-4399e2e4fffc4faba9f1505dfc0ad3150a948632.tar.bz2
Activate vomnibar in window.top; more clean up.
Diffstat (limited to 'lib/dom_utils.coffee')
-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.