How to import external SVG file into html?

I want to make a svg editor and I need to import any svg file the user selects.
I need the svg inline so I can manipulate it easily.

I use a input type=“file”

var i = $(’#import’)[0]

i.onchange = e =>{

    var file = i.files[0];
    if(file.type === 'image/svg+xml'){

      var obj = document.createElement('object');
      obj.data = URL.createObjectURL(file);
      obj.onload = e => URL.revokeObjectURL(obj.data);
      document.body.appendChild(obj);
      
  }
};

I’ve tried this code, when I first run electron it has #document , <svg> and <g> tags, but after I refresh the window is like this : <object data="blob:file:///ec939a41-3edc-413c-937c-f2943db4f93f"></object> .