Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying pagelet dependencies #21

Open
brikis98 opened this issue Jul 10, 2015 · 0 comments
Open

Add support for specifying pagelet dependencies #21

brikis98 opened this issue Jul 10, 2015 · 0 comments

Comments

@brikis98
Copy link
Owner

To be truly standalone, each pagelet should be able to specify its CSS and JS dependencies. The dependencies that are known statically can be concatenated & deduped by the controller and included in the head or foot of the document, as appropriate. The dependencies that are only known dynamically should be loaded by the pagelet itself. For example, the BigPipe.onPagelet method could be:

var BigPipe.onPagelet = function(placeholderId, contentId, cssDependencies, jsDependencies) { ... }

Using a tool like require.js, the onPagelet code could lod the cssDependencies and jsDepenencies before rendering this pagelet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant