Defer loading of the bokeh plot script
In the GoldenTemplate, the golden layout library dynamically populates the bokeh DOM nodes. However, Bokeh executes this before these DOM nodes have actually been added.
Currently the fix for this is a hack which initializes the GoldenLayout even though the document is not ready:
Object.defineProperty(document, 'readyState', {
get() { return readyState },
set(value) { return readyState = value },
});
document.readyState = 'complete'
However, ideally in the future we should somehow get the Bokeh plot script to defer loading until some condition is met.
See also the original issue: https://github.com/holoviz/panel/issues/3062
Also, and I'm not sure if this changes things; we are currently using GoldenLayout 1.5.9 but version 2 is also available: https://golden-layout.github.io/golden-layout/
Which is a complete rewrite in TypeScript + code cleanup + some API changes.