-
Notifications
You must be signed in to change notification settings - Fork 24.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
DebugElement.classes does not work for SVG elements in Ivy #34868
Comments
Looking at the documentation here, it would appear that |
Fixes Ivy throwing an error when trying to access the `DebugNode.classes` of an SVG element. The problem is that the `className` of an SVG element is an `SVGAnimatedString`, rather than a plain string. Fixes angular#34868.
Fixes Ivy throwing an error when trying to access the `DebugNode.classes` of an SVG element. The problem is that the `className` of an SVG element is an `SVGAnimatedString`, rather than a plain string. Fixes angular#34868.
Fixes Ivy throwing an error when trying to access the `DebugNode.classes` of an SVG element. The problem is that the `className` of an SVG element is an `SVGAnimatedString`, rather than a plain string. Fixes angular#34868.
Fixes Ivy throwing an error when trying to access the `DebugNode.classes` of an SVG element. The problem is that the `className` of an SVG element is an `SVGAnimatedString`, rather than a plain string. Fixes angular#34868.
Fixes Ivy throwing an error when trying to access the `DebugNode.classes` of an SVG element. The problem is that the `className` of an SVG element is an `SVGAnimatedString`, rather than a plain string. Fixes angular#34868.
Fixes Ivy throwing an error when trying to access the `DebugNode.classes` of an SVG element. The problem is that the `className` of an SVG element is an `SVGAnimatedString`, rather than a plain string. Fixes angular#34868.
Fixes Ivy throwing an error when trying to access the `DebugNode.classes` of an SVG element. The problem is that the `className` of an SVG element is an `SVGAnimatedString`, rather than a plain string. Fixes angular#34868. PR Close angular#34872
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
馃悶 bug report
Affected Package
The issue is caused by package @angular/core
Is this a regression?
Yes. Angular 8.x and before
Description
In unit tests when inspecting the
classes
property of aDebugElement
which wraps an SVGElement, the error:is thrown.
I can reproduce this error in the web browser by selecting an arbitrary SVG element (e.g.
document.querySelector('svg')
and accessingsvgElement.classList.split(' ');
on this element.The affected line of code is:
angular/packages/core/src/debug/debug_node.ts
Line 356 in 7d40185
馃敩 Minimal Reproduction
I can't get this to work in StackBlitz - it looks like Ivy isn't enabled there for some reason. I have made this repo with instructions in the README: https://github.com/euangoddard/svg-debug-element
馃敟 Exception or Error
馃實 Your Environment
Angular Version:
The text was updated successfully, but these errors were encountered: