Bokeh 2.x legacy js


I am trying to use the legacy Bokeh JS libraries to preserve functionality in embedding Bokeh plots and widgets in standalone HTML. My intended audience needs to still have functionality on IE11.

I see the introduction of legacy bundles since the 2.0.0 release and the open issue on Github here. I’m trying to write a minimal example for some problems I have been seeing with functionality using the legacy JS libraries but in the meantime I wanted to ask a few minor questions.

  1. What is the correct way to get the correct path to the legacy libraries? I can see them all listed on the release page in the table providing sri hashes, but I can’t find the actual URLs in the documentation. When I try to get the path using
    > bokeh.resources.Resources(mode="cdn",legacy=True).render()
    the result gives links of the form
    which are not valid (or give 403 error on attempt to access).
    I see this problem with Bokeh versions 2.1.1 and 2.0.2 but the link seems valid for 2.0.0.

  2. Is there documentation on the functionality differences between the legacy and main versions of the JS libraries? This might help explain some of the behaviour I’ve been seeing when trying to port my application to work on IE11. I can’t find it in the release notes or in the documentation, but it would be helpful to know what is different in the 2.1.1 documentation when using the legacy version. As a quick example, in the legacy libraries does getting dropdown widget values use dropdown.js_on_click (as with v2.x) or dropdown.js_on_change (as with v1.x)?

  3. To get the minimal example working I’m trying to test the latest version (2.1.1) and its legacy libraries. As the bokeh.resources query did not work, I just pointed to the links here. On testing I’m getting the cross origin errors mentioned here, possibly due to me going back and forth between using and not using SRI hashes. To be honest the issue discussion is a bit above my head: is best practice to always load from the Bokeh CDN URLs with SRI hashes? The documentation for embedding content seems to suggest it’s optional.

I really appreciate the continued support for legacy versions of the JS so thanks for all the efforts to keep up support for Bokeh 2.x. If these questions are best posed elsewhere, please let me know.


Hi @drew09 Thanks for the post. Can you open an issue on GitHub? There are two things:

  • The legacy bundles seem not to have gotten published correctly in the last few releases, so we will need to fix that

  • The person who can best answer 2) is most accessible on GitHub

Thanks very much for the quick reply!
I’ve posted an issue here. Appreciate the continuing support,