このコードは、ドアハンガーのポップアップを表示するために機能します。しかし、オプションの下でタイムアウトを使用したい場合、ポップアップ通知が表示されません。PopupNotificationのタイムアウト問題JavaScript XUL
構文:
Notification show(browser,id,message,anchorID,mainAction,secondaryActions,options);
マイコード:
PopupNotifications.show(gBrowser.selectedBrowser, "PDE-popup",
"Hi, there!, You can Build a PaDE by clicking on the PDE button!!",
null, /* anchor ID */
{
label: "Build PDE",
accessKey: "D",
callback: function() {
if(nodeSRC!=null) pde.emptyNodeSRC(nodeSRC);
window.openDialog("chrome://PDE/content/PDEBuilder.xul", "hello", "chrome,width=400,height=360",userContent, nodeSRC);
}
},null, { timeout: Date.now() + 10000,
persistWhileVisible: false });
1.Whatのこのコードで間違っていますか? 2.このドアハンガーポップアップをツールバーのボタンに表示するにはどうしたらいいですか? これは私が10秒にポップアップ通知を消えるしたいツールバーボタン
<toolbarbutton id="pde-toolbar-button" label="Detect"/>
です!どうもありがとう。
私は二次的な選択肢がありませんので、私はnullにしましたが、タイムアウトは機能していません。
http://scenari-platform.org/svn/dev-core/trunk/Lib_XulRunner/Darwin/modules/PopupNotifications.jsm
https://developer.mozilla.org/en/JavaScript_code_modules/PopupNotifications.jsm#Notification_events