Uncaught TypeError: "Cannot read property 'appendChild' of null" in Spotfire Web Player

Uncaught TypeError: "Cannot read property 'appendChild' of null" in Spotfire Web Player

book

Article ID: KB0070474

calendar_today

Updated On:

Products Versions
Spotfire Web Player 7.11 and higher

Description

If the API developer places their JS-API calls to spotfire.webPlayer.createApplication() above the <body>, the API will fail. The console will log:
 Uncaught TypeError: Cannot read property 'appendChild' of null     at loadProxy (loader.js:55)     at Object.spotfire.webPlayer.createApplication (loader.js:36)     at index.html:18 loadProxy @ loader.js:55 spotfire.webPlayer.createApplication @ loader.js:36 (anonymous) @ index.html:18

Issue/Introduction

Uncaught TypeError: Cannot read property 'appendChild' of null in Spotfire Web Player.

Resolution

Ensure that the JS-API calls to spotfire.webPlayer.createApplication() are written below the <body> tag as shown below.
User-added image

Additional Information