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

Unified Diff: src/site/samples/jsonp/example/index.dart

Issue 1387723002: Updating the samples page to reflect the examples that have been retired. (Closed) Base URL: https://github.com/dart-lang/www.dartlang.org.git@master
Patch Set: Created 5 years, 2 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 | « src/site/samples/index.markdown ('k') | src/site/samples/jsonp/example/index.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/site/samples/jsonp/example/index.dart
diff --git a/src/site/samples/jsonp/example/index.dart b/src/site/samples/jsonp/example/index.dart
deleted file mode 100644
index bbcedac86e47d965edaa930e5f36fadb307b25ad..0000000000000000000000000000000000000000
--- a/src/site/samples/jsonp/example/index.dart
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library jsonp_sample;
-
-import 'dart:html';
-import 'dart:js';
-
-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(JsObject 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 repo in response['data']) {
- addTableBodyRow(repo);
- }
- };
-
- 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 | « src/site/samples/index.markdown ('k') | src/site/samples/jsonp/example/index.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698