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

Unified Diff: sky/examples/file-browser.sky

Issue 951673003: Remove outdated examples and framework pieces (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 | « sky/examples/dart-library.sky ('k') | sky/examples/radio.sky » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/examples/file-browser.sky
diff --git a/sky/examples/file-browser.sky b/sky/examples/file-browser.sky
deleted file mode 100644
index 05d72dee48e57983a80135990b37f5ec7ad4c1fa..0000000000000000000000000000000000000000
--- a/sky/examples/file-browser.sky
+++ /dev/null
@@ -1,45 +0,0 @@
-#!mojo mojo:sky_viewer
-<!--
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
--->
-<import src="../framework/sky-element/sky-element.sky" as="SkyElement" />
-<import src="../framework/xmlhttprequest.sky" as="XMLHttpRequest" />
-
-<sky-element name="file-browser">
-<template>
- <style>
- heading {
- font-size: 16px;
- }
- </style>
- <heading>File browser for {{ url }}</heading>
- <template repeat="{{ directories }}">
- <a href="{{}}">{{}}</a>
- </template>
- <template repeat="{{ files }}">
- <a href="{{}}">{{}}</a>
- </template>
-</template>
-<script>
-module.exports = class extends SkyElement {
- created() {
- this.url = '';
- this.files = [];
- this.directories = [];
- }
- attached() {
- this.url = this.ownerDocument.URL;
- var xhr = new XMLHttpRequest();
- xhr.open('GET', this.url + '?format=json');
- xhr.onload = (function() {
- var listing = JSON.parse(xhr.responseText);
- this.files = listing.files;
- this.directories = listing.directories;
- }).bind(this);
- xhr.send();
- }
-}.register();
-</script>
-</sky-element>
« no previous file with comments | « sky/examples/dart-library.sky ('k') | sky/examples/radio.sky » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698