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

Unified Diff: third_party/pkg/js/example/jsonp/jsonp.dart

Issue 180843004: Revert revision 33053 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/pkg/js/REVISION ('k') | third_party/pkg/js/example/jsonp/jsonp.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/pkg/js/example/jsonp/jsonp.dart
===================================================================
--- third_party/pkg/js/example/jsonp/jsonp.dart (revision 33054)
+++ third_party/pkg/js/example/jsonp/jsonp.dart (working copy)
@@ -1,48 +0,0 @@
-library jsonp_sample;
-
-import 'dart:html';
-
-import 'package:js/js.dart';
-
-const List<String> FIELDS = const ['name', 'description', 'size',
- 'watchers', 'forks'];
-
-TableElement table = querySelector('#repo-table');
-
-addTableHeadRow() {
- var tr = new TableRowElement();
- for (var field in FIELDS) {
- tr.append(new Element.tag('th')..text = field);
- }
- table.querySelector('thead').append(tr);
-}
-
-addTableBodyRow(Proxy repo) {
- var tr = new TableRowElement();
- for (var field in FIELDS) {
- var td = new TableCellElement();
- if (field == 'name') {
- td.append(new AnchorElement()
- ..href = repo.html_url
- ..text = repo[field]);
- } else {
- td.text = repo[field].toString();
- }
- tr.append(td);
- }
- table.querySelector('tbody').append(tr);
-}
-
-void main() {
- // Create a jsObject to handle the response.
- context.processData = (response) {
- addTableHeadRow();
- for (var i = 0; i < response.data.length; i++) {
- addTableBodyRow(response.data[i]);
- }
- };
-
- ScriptElement script = new Element.tag("script");
- script.src = "https://api.github.com/users/dart-lang/repos?callback=processData";
- document.body.children.add(script);
-}
« no previous file with comments | « third_party/pkg/js/REVISION ('k') | third_party/pkg/js/example/jsonp/jsonp.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698