loading-bar
loading-bar copied to clipboard
uncaught (in promise) DOMException: Failed to execute 'createElementNS' on 'Document'
Got this error by adding a simple progress bar to the html body:
<div class="ldBar" data-value="50"></div>
I got the same error. @ofekmiz did you figure out a solution for that?
If anyone else seeing this issue, I had the same problem when using loading-bar with Bootstrap (v5.1.3) and then trying to open a Bootstrap modal popup on the page later.
I believe the issue is a conflict with the x$.append function in loading-bar.js - if I remove this function (line 187-190) then all appears to work again. Not sure what option is removed by removing this section, but it seems to fix temporarily for me and doesn't seem to affect functionality of loading-bar SVG showing. Maybe someone else can amend this function to fix the issue correctly.
Remove this section
x$.append = function(n){ var r; return this.appendChild(r = document.createElementNS("http://www.w3.og/2000/svg", n)); };