You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
amp-add-class includes amp-has-class which appears to be based off of JQuery. When using amp-add-class on an SVGElement (or any object derived from one), the method hasClass() fails.
This because of the following line. var cName = (isString(el) ? el : el.className).replace(whitespaceRE, ' ');
Once it sees that the element is an object it tries to use className which doesn't work for SVG Elements in IE10.
A workaround is to simply use element.classList.add('classname') and element.classList.remove('classname'). Again this was only tested in an IE 10 browser in a Windows 8 environment, testing in chrome and firefox
(edited 0516PM EST) "testing in chrome and firefox" did not have this issue, sorry for that.
The text was updated successfully, but these errors were encountered:
amp-add-class includes amp-has-class which appears to be based off of JQuery. When using amp-add-class on an SVGElement (or any object derived from one), the method hasClass() fails.
This because of the following line.
var cName = (isString(el) ? el : el.className).replace(whitespaceRE, ' ');
Once it sees that the element is an object it tries to use className which doesn't work for SVG Elements in IE10.
A workaround is to simply use element.classList.add('classname') and element.classList.remove('classname'). Again this was only tested in an IE 10 browser in a Windows 8 environment, testing in chrome and firefox
(edited 0516PM EST) "testing in chrome and firefox" did not have this issue, sorry for that.
The text was updated successfully, but these errors were encountered: