1
이 코드는 도어 행거 팝업을 표시하는 데 적합합니다. 그러나 옵션 아래에서 시간 제한을 사용하려면 팝업 알림이 표시되지 않습니다.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. 도구 모음 버튼에이 문 행어 팝업을 표시하려면 어떻게합니까? 이 도구 모음 버튼
<toolbarbutton id="pde-toolbar-button" label="Detect"/>
내가 10 초에 팝업 알림을 사라지게 할 것입니다! 고마워.
보조 옵션이 없으므로 null로 설정했지만 시간 제한이 작동하지 않습니다.