diff --git a/CHANGELOG.md b/CHANGELOG.md index b1b7bf6..5da0a5f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +## 4.1.10 - Released on 2025-11-19 + +### Features + +- Added support both `xlink:href` and `href` attributes for SVG `` tags in IconManager. + +
+ ## 4.1.9 - Released on 2025-09-24 ### Features diff --git a/package-lock.json b/package-lock.json index 09cb46b..26fc528 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "prismium-src", - "version": "4.1.9", + "version": "4.1.10", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "prismium-src", - "version": "4.1.9", + "version": "4.1.10", "license": "MIT", "devDependencies": { "@csstools/postcss-is-pseudo-class": "5.0.1", diff --git a/package.json b/package.json index de686fa..958bfdb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "prismium-src", - "version": "4.1.9", + "version": "4.1.10", "description": "A modern JavaScript accordion library with smooth animations. Easily integrates with React, Vue, and vanilla JavaScript.", "type": "module", "scripts": { diff --git a/src/core/managers/IconManager.mjs b/src/core/managers/IconManager.mjs index 33ffd32..bc48bd3 100644 --- a/src/core/managers/IconManager.mjs +++ b/src/core/managers/IconManager.mjs @@ -32,11 +32,19 @@ export class IconManager { if (!useTag) return; const icon = state === 'open' ? this.icon.close : this.icon.open; - useTag.setAttributeNS( - 'http://www.w3.org/1999/xlink', - 'xlink:href', - `${this.instance.options.spritePath}#${icon}` - ); + + if (useTag.hasAttribute('xlink:href')) { + useTag.setAttributeNS( + 'http://www.w3.org/1999/xlink', + 'xlink:href', + `${this.instance.options.spritePath}#${icon}` + ); + } else { + useTag.setAttribute( + 'href', + `${this.instance.options.spritePath}#${icon}` + ); + } } if (this.icon.type === 'multiple') {