Closed Bug 1020078 Opened 11 years ago Closed 10 years ago

Allow inlining JS in shared folder for web component

Categories

(Firefox OS Graveyard :: Gaia::Build, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: gasolin, Unassigned)

References

Details

there are several web components in shared/elements. It will be great to inline web components' js/css into single file to save loading time.
This issue is fired per discussion off line. @arnau, would you like to elaborate more about this request?
Flags: needinfo?(arnau)
Summary: Allow inling JS in shared folder for web component → Allow inlining JS in shared folder for web component
NB: For those apps already using r.js/alameda (or those that are otherwise headed down such a path), :jrburke's https://github.com/jrburke/element provides a mechanism for accomplishing things like this, including inlining as part of a larger optimized aggregation. We are planning to use it in the email app.
Curious as to what we're thinking about inlining here. For the HTML import polyfill we inlined the HTML as <!-- comment nodes --> within the html files, but it's not really possible to do that with components due to CSP and all of the javascript required. Whatever we decide to inline, let's profile it first to make sure there really is a performance improvement.
We should look at Vulcanize [1]. Let's collaborate! [1] https://github.com/Polymer/vulcanize
great to know there's an existing tool can do so!
Since current gaia-component already put js/css into .js and not use the HTML import polyfill, we don't need that tool.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.