Created
August 2, 2015 16:24
-
-
Save freaktechnik/6eddb42679832e961ca6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Ci is a shorthand for Components.interfaces that has to be defined beforehand. | |
| var enumerator; // is a nsISimpleEnumberator | |
| // Adjust the elementInterface to support your needs / what the enumerator actually provides. Feel free to hard code that instead of doing it this way. | |
| var element, elementInterface = "nsISupports"; | |
| while(enumerator.hasMoreElements()) { | |
| element = enumerator.getNext().QueryInterface(Ci[elementInterface]); | |
| // do stuff with element | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment