The document.querySelector(’#id’) is null in js. I’m guessing that the error occurred because I imported js files that were executed before DashRenderer().
// The scripts oreder in HTML
// <script src="/assets/js/nav-menu.js?m=1623147446.3624363"></script>
// <script src="/_dash-component-suites/dash_renderer/dash_renderer.v1_9_1m1622237833.dev.js"></script>
// <script id="_dash-renderer" type="application/javascript">var renderer = new DashRenderer();</script>
var renderer = new DashRenderer();
So my question is how can I put the js (in assets) after the render event to make sure my statement is no longer null?
4 posts - 2 participants