nsIDOMWindowUtils.isInModalState() not working
nsIDOMWindowUtils.isInModalState() not working
我得到了窗口的utils
:
var utils = Services.wm.getMostRecentWindow('navigator:browser').
QueryInterface(Components.interfaces.nsIInterfaceRequestor).
getInterface(Components.interfaces.nsIDOMWindowUtils);
则运行这段代码表明它不是一个函数:
Services.prompt.alert(null, 'is modal?', utils.isInModalState())
//Exception: utils.isInModalState is not a function
尽管它在文档中说它是。
我也不能运行这段代码:
utils.enterModalState()
运行没有错误,但窗口没有进入或离开模式状态
.isInModalState
属性实际上被标记为[noscript]
,因此它在Javascript中不可用,只有c++。
.enterModalState()
不做你认为它做什么。它不会使窗口变成UI-modal(像警告对话框)。它只是暂停窗口中的脚本和事件处理。
相关文章:
- $rootScope not working
- jQuery document.ready not working
- Javascript getElementsByTagName not working?
- JQuery.val( ) not working
- Tomcat websocket is not working
- Javascript JSON.parse not working
- NodeJS Multer is not working
- Regex not working
- Ember run.debounce not working
- AngularJs 1 not working
- document.getElementById.style.backgroundImage not working
- Rxjs5, distinct() is not working
- createOscillator noteOn not working
- Javascript - .getHours() not working
- Javascript setTimeout not working | onkeydown
- MongoDB $pull not working
- Express router.use not working
- JSONP not working
- window.opener not working in chrome & IE
- Backbone + RequireJS: Collection.each() is not working