Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Events 不';t Xul';l浏览器焦点事件工作?_Events_Browser_Focus_Xul - Fatal编程技术网

Events 不';t Xul';l浏览器焦点事件工作?

Events 不';t Xul';l浏览器焦点事件工作?,events,browser,focus,xul,Events,Browser,Focus,Xul,我有以下浏览器元素: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window width="400" height="300" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <browser i

我有以下浏览器元素:

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window width="400" height="300"
    xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

    <browser
        id="mybrowser"
        onclick="dump('CLICKED!\n')"
        onfocus="dump('FOCUSED!\n')"
        type="content"
        src="http://www.google.com/"
        flex="1" />

</window>

onclick
运行良好,但
onfocus
却没有。两者都是从继承而来的,所以它应该是有效的

知道它为什么不起作用吗


obs.我知道我可以通过在窗口中添加一个焦点侦听器来实现。但是我想知道为什么
onclick
被继承并用于浏览器元素,而
onfocus
没有。答案是click事件冒泡,而focus(和blur)事件没有。(加载和卸载事件稍有不同,页面[i]框架元素上的事件处理程序将触发,就像事件已冒泡一样。它们仍然不会冒泡到

我不知道这些事件为什么没有泡沫