mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-10-20 04:42:29 +02:00
Use a better document iterator for applying overlays so that we can overlay documents in tabs as well.
This commit is contained in:
1 parent
475a3244c5
commit
475da7edd9
2 files changed
+28
-9
No files matched your search
@@ -52,13 +52,15 @@ function checkDocument(doc, disable, force) {
|
||||
}
|
||||
|
||||
function chromeDocuments() {
|
||||
let windows = Services.ww.getXULWindowEnumerator(null);
|
||||
let windows = services.windowMediator.getXULWindowEnumerator(null);
|
||||
while (windows.hasMoreElements()) {
|
||||
let window = windows.getNext().QueryInterface(Ci.nsIXULWindow);
|
||||
let docShells = window.docShell.getDocShellEnumerator(Ci.nsIDocShell.typeChrome,
|
||||
Ci.nsIDocShell.ENUMERATE_FORWARDS);
|
||||
while (docShells.hasMoreElements())
|
||||
yield docShells.getNext().containedDocShells.DOMDocument;
|
||||
for each (let type in ["typeChrome", "typeContent"]) {
|
||||
let docShells = window.docShell.getDocShellEnumerator(Ci.nsIDocShellTreeItem[type],
|
||||
Ci.nsIDocShell.ENUMERATE_FORWARDS);
|
||||
while (docShells.hasMoreElements())
|
||||
yield docShells.getNext().QueryInterface(Ci.nsIDocShell).contentViewer.DOMDocument;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user