Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我写了一个 Firefox 扩展,它需要知道菜单栏是否存在。并且还需要通知隐藏/显示菜单栏?
我该怎么做呢 ?请帮我
检查 的autohide属性toolbar-menubar。
autohide
toolbar-menubar
var menubarPresent = document.getElementById("toolbar-menubar").getAtttribute("autohide") === "false" ? true : false
您可以通过MutationObserver获得更改通知