type error null is not an object« Back to Questions List
every time i try to import svg contain any text the message show "type error null is not an object" what i can do ? |
Do you have the right answer? If you do other users will benefit from your contribution, share your knowledge with the community!
This error occurs when you read a property or call a method on a null object . That’s because the DOM API returns null for object references that are blank. An object is expected somewhere and wasn’t provided. So, you will get null is not an object error if the DOM elements have not been created before loading the script. In JavaScript , null is not an object; and won’t work. You must provide a proper object in the given situation. We can resolve this type of issues by adding an event listener that will notify us when the page is ready. Once the addEventListener is fired, the init() method can make use of the DOM elements. document.addEventListener(’readystatechange’, function() { if (document.readyState === ”complete”) { init(); }
|
Hi, Can you explain a bit more? Are you trying to import into Photoshop or into a webpage? |
Share Your Knowledge!
Contribute to the community and help other users to benefit from your answer with experience and knowledge.