B2G/gecko/layout/tools/reftest/reftest.js
// Return true iff this window is focused when this function returns.
Return true iff this window is focused when this function returns.
Return true iff this window is focused when this function returns .
function Focus()
{
    if (gBrowserIsRemote) {
        return false;
    }
    var fm = CC["@mozilla.org/focus-manager;1"].getService(CI.nsIFocusManager);
    fm.focusedWindow = gContainingWindow;
    try {
        var dock = CC["@mozilla.org/widget/macdocksupport;1"].getService(CI.nsIMacDockSupport);
        dock.activateApplication(true);
    } catch(ex) {
    }
    return true;
}
function Focus ( ) { if ( gBrowserIsRemote ) { return false ; } var fm = CC [ "@mozilla.org/focus-manager;1" ] . getService ( CI . nsIFocusManager ) ; fm . focusedWindow = gContainingWindow ; try { var dock = CC [ "@mozilla.org/widget/macdocksupport;1" ] . getService ( CI . nsIMacDockSupport ) ; dock . activateApplication ( true ) ; } catch ( ex ) { } return true ; }
Return true iff this window is focused when this function returns.
Return true iff this window is focused when this function returns .
// FIXME/bug 583976: focus doesn't yet work with out-of-process // content.