On Wed, Jul 8, 2009 at 11:05, Glen Murphy<[email protected]> wrote: > This time from a Chromium account: > > It would be nice if we didn't have to use JS and could just embed the > strings live so that they could be cached, etc. Our CSS (and maybe > even JS) files could use something like this, (currently we're just > doing $0-$9 replacement).
I'm not sure what you mean be "embed the > strings live so that they could be cached"? > This may be separate to what you're looking for. It was different from what I had in mind but maybe we should do the string injection on the front end instead of JS? What was the reason for doing it in JS in the first place? > On Wed, Jul 8, 2009 at 11:02 AM, Erik Arvidsson<[email protected]> wrote: >> Currently we use JsTemplate >> (http://code.google.com/p/google-jstemplate/) to do our l10n of the >> DOMUI. JST has been working well but it is a bit of an overkill to do >> l10n of our UI. It has a couple of features that makes it slow down >> the UI: >> >> 1. It uses eval for every single RHS >> 2. It uses two nested with statements >> 3. It traverses the whole DOM using JavaScript >> >> It also has some advanced features like jsselect, which allows >> iteration, that we are using for non l10n things. >> >> My plan is to create a simpler solution, with almost exactly the same >> syntax that solves the 3 bullet points above. It will not allow >> arbitrary expressions on the RHS and it will only support jsvalues and >> jscontent. Instead of traversing the entire tree it ill use >> document.querySelector which does the tree traversal in C++ and uses >> CSS selectors as the matching which is a lot faster than doing the >> tree traversal in JS. >> >> Since there are still cases where we use JST to do more advanced >> templating it will still be available but it will require opt in. >> >> Any thoughts? >> >> -- >> erik >> > -- erik --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
