質問

どのように Firefoxを再起動する(「セッションの復元」を「復元する」ものと以前と同じウィンドウを使用して、コードから

Bashスクリプトプロセスで "Firefox-bin"のPIDを知っています。

役に立ちましたか?

解決

Services.prefs.setBoolPref("browser.sessionstore.resume_session_once", true);
const nsIAppStartup = Components.interfaces.nsIAppStartup;
Components.classes["@mozilla.org/toolkit/app-startup;1"]
          .getService(nsIAppStartup)
          .quit(nsIAppStartup.eRestart | nsIAppStartup.eAttemptQuit);

Note that this applies to Firefox 4 so the code might be slightly different for earlier versions.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top