0
我使用工具欄按鈕在常規和專用窗口之間切換。 下面是代碼:Firefox - 使用ITaskbarList :: ActivateTab
OpenBrowserWindow({private: !PrivateBrowsingUtils.isWindowPrivate(window)});
setTimeout(BrowserTryToCloseWindow, 80);
我爲了防止一些閃爍使用「setTimeout的」。
當新窗口打開時,它將獲得焦點。 執行命令'BrowserTryToCloseWindow'時,焦點返回到舊窗口。 當舊窗口關閉時,新窗口確實有焦點,但它在Windows任務欄中未被「檢查/激活」。
我想我需要使用ITaskbarList :: ActivateTab來激活任務欄中的新窗口。 我有(非常)基本方向:
Components.utils.import("resource://gre/modules/ctypes.jsm");
var lib = ctypes.open("shell32.dll");
var taskBar = lib.declare(---
taskBar---
lib.close();
我會很感激你的幫助。
贏7,32位經典主題。