Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: chrome/third_party/jstemplate/tutorial_examples/01-quick.html

Issue 11971042: Move chrome\third_party\jstemplate to third_party\jstemplate since it's used from ui\. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: sync Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <head><title>Jstemplates: Quick example</title>
3 <script src="../util.js" type="text/javascript"></script>
4 <script src="../jsevalcontext.js" type="text/javascript"></script>
5 <script src="../jstemplate.js" type="text/javascript"></script>
6 <script type="text/javascript">
7 var favdata = {
8 title: 'Favorite Things',
9 favs: ['raindrops', 'whiskers', 'mittens']
10 };
11
12 function showData(data) {
13 // This is the javascript code that processes the template:
14 var input = new JsEvalContext(data);
15 var output = document.getElementById('t1');
16 jstProcess(input, output);
17 }
18 </script>
19 </head>
20 <body onload="showData(favdata)">
21
22 <!--
23 This is the template:
24 -->
25 <div id="t1">
26 <h1 jscontent="title"></h1>
27 <ul><li jscontent="$this" jsselect="favs"></li></ul>
28 </div>
29 <p>
30 <a href="#" onclick="favdata.favs.push('packages');showData(favdata);">Reprocess </a>
31 </p>
32 </body>
33 </html>
OLDNEW
« no previous file with comments | « chrome/third_party/jstemplate/jstemplate_test.js ('k') | chrome/third_party/jstemplate/tutorial_examples/02-gettpl.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698