Closed Bug 1560174 Opened 5 years ago Closed 5 years ago

JavaScript Warning: "Removed unsafe attribute. Element: svg. Attribute: xmlns." {file: "resource://devtools/client/debugger/src/components/Editor/ColumnBreakpoint.js" line: 27}

Categories

(DevTools :: Debugger, defect)

defect
Not set
normal

Tracking

(firefox69 fixed)

RESOLVED FIXED
Firefox 69
Tracking Status
firefox69 --- fixed

People

(Reporter: dholbert, Assigned: davidwalsh)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

I noticed this message in the logging on bug 1559761 comment 0:

08:57:59 INFO - Console message: [JavaScript Warning: "Removed unsafe attribute. Element: svg. Attribute: xmlns." {file: "resource://devtools/client/debugger/src/components/Editor/ColumnBreakpoint.js" line: 27}]

That is from this chunk of JS:
**
const breakpointButton = document.createElement("button");
breakpointButton.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 13" width="11" height="13"><path d="M5.07.5H1.5c-.54 0-1 .46-1 1v10c0 .54.46 1 1 1h3.57c.58 0 1.15-.26 1.53-.7l3.7-5.3-3.7-5.3C6.22.76 5.65.5 5.07.5z"/></svg>';
**

Apparently the xmlns doesn't make it into the actual document here, and it presumably doesn't matter since this is SVG-in-HTML5 which doesn't require a xmlns attribute at all.

We should just simplify that innerHTML assignment to drop the xmlns attribute to avoid triggering this warning.

Keywords: regression
Pushed by dwalsh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bf8e7cbb75d6
Prevent xmlns warning for breakpoint SVGs r=jlast
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 69
Assignee: nobody → dwalsh
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: