Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/inspectorObserver.js

Issue 29357569: Issue 4533 - Don't rely on the default namespace to be XUL for DevTools (Closed) Base URL: https://hg.adblockplus.org/elemhidehelper
Patch Set: Created Oct. 17, 2016, 9 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/inspectorObserver.js
===================================================================
--- a/lib/inspectorObserver.js
+++ b/lib/inspectorObserver.js
@@ -56,17 +56,20 @@ let InspectorObserver =
let inspectorAddButton = panelWindow.document.getElementById("inspector-element-add-button");
if (inspectorAddButton && inspectorAddButton.parentNode == inspectorToolbar)
{
// Firefox 48+
insertBefore = inspectorAddButton.nextSibling;
}
let tooltiptext = InspectorObserver.inspectorButtonTooltip;
- let button = panelWindow.document.createElement("toolbarbutton");
+ let button = panelWindow.document.createElementNS(
+ "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul",
saroyanm 2016/10/17 12:02:09 LGTM
+ "toolbarbutton"
+ );
button.setAttribute("id", "ehh-inspector-toolbarbutton");
button.setAttribute("class", "devtools-toolbarbutton");
button.setAttribute("tooltiptext", tooltiptext);
button.setAttribute("tabindex", "0");
button.addEventListener("command", () =>
{
let node = panel.selection.nodeFront;
let target = panel.target;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld