Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## 4.1.10 - Released on 2025-11-19

### Features

- Added support both `xlink:href` and `href` attributes for SVG `<use>` tags in IconManager.

<br>

## 4.1.9 - Released on 2025-09-24

### Features
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
18 changes: 13 additions & 5 deletions src/core/managers/IconManager.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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') {
Expand Down