cm-chessboard 7.6.8 → 7.6.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/lib/Svg.js +2 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cm-chessboard",
3
- "version": "7.6.8",
3
+ "version": "7.6.9",
4
4
  "description": "A JavaScript chessboard which is lightweight, ES6 module based, responsive, SVG rendered and without dependencies.",
5
5
  "keywords": [
6
6
  "chess",
package/src/lib/Svg.js CHANGED
@@ -28,10 +28,9 @@ export class Svg {
28
28
  * @param parent
29
29
  * @param name
30
30
  * @param attributes
31
- * @param sibling // TODO remove this parameter (2023-05-22)
32
31
  * @returns {Element}
33
32
  */
34
- static addElement(parent, name, attributes = {}, sibling = undefined) {
33
+ static addElement(parent, name, attributes = {}) {
35
34
  let element = document.createElementNS(SVG_NAMESPACE, name)
36
35
  if (name === "use") {
37
36
  attributes["xlink:href"] = attributes["href"] // fix for safari
@@ -46,11 +45,7 @@ export class Svg {
46
45
  }
47
46
  }
48
47
  }
49
- if (sibling !== undefined) {
50
- parent.appendChild(element)
51
- } else {
52
- parent.insertBefore(element, sibling)
53
- }
48
+ parent.appendChild(element)
54
49
  return element
55
50
  }
56
51