Closed
Bug 1016830
Opened 12 years ago
Closed 11 years ago
Console.jsm fails when logging SVG elements
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(Not tracked)
RESOLVED
WORKSFORME
People
(Reporter: pbro, Unassigned)
Details
Attachments
(2 obsolete files)
0:06.53 A coding exception was thrown and uncaught in a Task.
0:06.53
0:06.53 Full message: TypeError: aElement.className.split is not a function
0:06.53 Full stack: debugElement@resource://gre/modules/devtools/Console.jsm:167:1
0:06.53 stringify@resource://gre/modules/devtools/Console.jsm:130:7
0:06.53 createDumper/</data<@resource://gre/modules/devtools/Console.jsm:471:7
0:06.53 createDumper/<@resource://gre/modules/devtools/Console.jsm:470:9
0:06.53 isHighlighterVisible@chrome://mochitests/content/browser/browser/devtools/markupview/test/head.js:228:21
0:06.54 test<@chrome://mochitests/content/browser/browser/devtools/markupview/test/browser_markupview_highlight_hover_02.js:19:3
0:06.54 TaskImpl_run@resource://gre/modules/Task.jsm:282:13
0:06.54 Handler.prototype.process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:863:11
0:06.54 this.PromiseWalker.walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:742:7
This happened when I tried to `console.log(element)` in a mochitest.
element, in this case, is a SVG node and apparently its className property is of type SVGAnimatedString which doesn't implement the split function (https://developer.mozilla.org/en-US/docs/Web/API/SVGAnimatedString).
Comment 1•12 years ago
|
||
| Reporter | ||
Comment 3•12 years ago
|
||
Fails with the following error: "ReferenceError: SVGAnimatedString is not defined"
Would aElement.ownerDocument.defaultView.SVGAnimatedString work ?
Flags: needinfo?(pbrosset)
Comment 4•12 years ago
|
||
This seems to work.
Assignee: nobody → longsonr
Attachment #8430586 -
Attachment is obsolete: true
Updated•12 years ago
|
Attachment #8432136 -
Flags: review?(jwalker)
Updated•12 years ago
|
Attachment #8432136 -
Flags: review?(jwalker)
| Reporter | ||
Comment 5•11 years ago
|
||
This got fixed since I filed it. Apparently by bug 920141.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WORKSFORME
Updated•11 years ago
|
Assignee: longsonr → nobody
Updated•11 years ago
|
Attachment #8432136 -
Attachment is obsolete: true
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•