Why there is a problem initializing VK.init?

0 like 0 dislike
Good day to all.

I can not understand why is not working VK.init.

And I'm not sure, but I had to do it right. In the beginning I went on the "create app". Select "Standalone application". Then, I set the site address and base domain. I used github pages.

And then, in the end, I wrote the following code (as in documentation):
<!DOCTYPE html>Test VK APIVK.init({apiId: \tMY_ID});

Where MY_ID - id of my app.

Move on to the site of my github pages repository and see the error.
openapi.js?153:434 Uncaught TypeError: Cannot read property 'insertBefore' of undefined at Object.VK.init (openapi.js?153:434) at (index):8

index 8 is the initialization.

root = document.getElementById(VK._rootId); if (!root) { root = document.createElement('div'); root.id = VK._rootId; body = document.getElementsByTagName('body')[0]; body.insertBefore(root, body.childNodes[0]); }

In General, I don't know what you're doing wrong.
by | 16 views

1 Answer

0 like 0 dislike
Translation error "unable to read the variable svolto insertBefore bady"
File openapi.js line 153 symbol 434
110,608 questions
257,186 answers
33,910 users