mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-16 07:55:45 +01:00
Use a better document iterator for applying overlays so that we can overlay documents in tabs as well.
This commit is contained in:
@@ -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