vue-codemirror icon indicating copy to clipboard operation
vue-codemirror copied to clipboard

Error in mounted hook: "TypeError: Cannot read property 'appendChild' of null"

Open DaTongDXM opened this issue 4 years ago • 0 comments

The code I run contains a component that needs to add a canvas tag to the dom. `

  • const oDiv = document.getElementById(self.table.id);
  • const canvas = document.createElement('canvas');
  • oDiv.appendChild(canvas);
    ` When I run it, I report an error: Error in mounted hook: "TypeError: Cannot read property 'appendChild' of null" How to solve this problem

DaTongDXM avatar Jan 02 '21 08:01 DaTongDXM