WIP: Allow renderjs from JS only, without initial gadget-tag/script-tag
-
In order to integrate renderjs and jupyter I need to be able to load everything-renderjs from a javascript interface. The inital loaded HTML does not contain anything of renderjs and gets added only after pageload.
I thus added functionallity to renderjs to initialize manually, after pageload. See the forum entry here. -
Instead of registering
init()
for theDOMContentLoaded
event directly, a deferred promise is used which gets resolve either by the event, or by a manual call ofrJS.manualBootstrap()
. -
An additional change is required to prevent renderjs bootstrapping multiple times when first loaded via
$.getScript
, and later included in a gadget via<script>
(Line 685). I am not sure if this is the best way to do things though and if it breaks other stuff. -
I am generally new to this library and RSVP so this might be flawed and so, please comment. @romain @klaus