Quick question. Is the following code
var focusedWindow = document.commandDispatcher.focusedWindow;
only going to work in a Firefox extension? I ask because it seems to kill the script at this line and I’m wondering if command dispatcher is an internal part to Firefox?
The command dispatcher is defined as a property on the ChromeWindow class, which is specific to Gecko applications.
Web applications should use document.activeElement instead, although it’s not as powerful as focusedWindow.