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 ?

Asked by scorpion2020
Added June 15, 2018 1:07 am

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();

}

 

 

Answer by jefryarch
Answered On April 16, 2020 11:16 am #

Hi,

Can you explain a bit more? Are you trying to import into Photoshop or into a webpage?

Answer by admin
Answered On August 11, 2018 8:58 am #
Looking for another answer? View other questions in Text Error or get premium support for guaranteed results.
Asked by scorpion2020
897 views
2 answers
Last Answered 1 year ago by jefryarch

Categories

Recent Answers

asked by PixelForce
asked by samiteam
asked by zipsoft
[+] View All Recent Questions

Share Your Knowledge!

Contribute to the community and help other users to benefit from your answer with experience and knowledge.