Skip to content

Robust javascript dependency handling in the browser #121

@hafen

Description

@hafen

This may be more of a question for @jcheng5 and equally relevant to shiny, but as I've been following some recent issues (#83, #58, etc.), and as I've been dealing with an app that tries to allow dynamic specification of different htmlwidgets to view, I've been thinking a lot about dependency injection for htmlwidgets / shiny in general.

As the number of widgets grows and apps or docs with multiple widgets that potentially interact with each other become more commonplace, there are bound to be issues where simply handling dependencies by sticking a script tag in head for each dependency will eventually run into problems, such as collisions (different widgets want different versions of the same dependency, different widgets declare global variables with the same name but different functionality). This can be skirted by using iframes but then you can't have interactivity between the widgets. Have there been any discussions or are there any thoughts on using something like requirejs or doing some kind of per-widget namespacing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions