xul eclipse插件
I've been working on a new addon at Mozilla which isn't anywhere near finished so I wont bother telling you what it's meant to do...because it could change at any moment. Since this is my first real addon, it's been a struggle, but that's a good thing -- it means I'm learning a ton. One problem I ran into was trying to get a checkbox (INPUT) element within the addon via JavaScript -- nothing was displaying.
我一直在Mozilla上开发一个新的插件,该插件尚未完成,所以我不会费心告诉您它的意思是...因为它随时可能更改。 由于这是我的第一个真正的附加组件,因此一直很努力,但这是一件好事-这意味着我正在学习很多东西。 我遇到的一个问题是试图通过JavaScript在插件中获取一个复选框( INPUT )元素-什么也没显示。
After a bit of research and guesswork, I figured out what I was doing wrong -- I was using the wrong document method to create the element:
经过一些研究和猜测之后,我发现自己做错了-我使用了错误的document方法来创建元素:
var input = document.createElementNS("http://www.w3.org/1999/xhtml", "input");Using document.createElementNS with the proper namespace resulted in my checkbox displaying in all of its glory. It's beautiful square, checked glory. Firefox addons can be created in a number of ways so if you're looking to create your own and you aren't seeing HTML elements correctly, keep this solution in mind!
将document.createElementNS与正确的命名空间一起使用会导致我的复选框全面显示。 这是美丽的广场,光彩夺目。 Firefox插件可以通过多种方式创建,因此,如果您要创建自己的插件,而又没有正确看到HTML元素,请牢记此解决方案!
翻译自: https://davidwalsh.name/add-html-elements-xul-addons
xul eclipse插件
相关资源:jdk-8u281-windows-x64.exe