How to install Node.js on Chrome Os.
- Chrome Os running in Developer Mode.
- crouton (Chromium OS Universal Chroot Environment).
When not in Developer Mode check the official chromium poking-around-your-chrome-os-device page.
<link rel="import" href="..\..\bower_components/polymer/polymer.html"> | |
<polymer-element name="twitch-service" attributes=""> | |
<template> | |
<style> | |
.offline { | |
display: none; | |
} | |
</style> | |
<link rel="stylesheet" href="twitch-service.css"> |
/** | |
* simple JSONP support | |
* | |
* JSONP.get('https://api.github.com/gists/1431613', function (data) { console.log(data); }); | |
* JSONP.get('https://api.github.com/gists/1431613', {}, function (data) { console.log(data); }); | |
* | |
* gist: https://gist.github.com/gists/1431613 | |
*/ | |
var JSONP = (function (document) { | |
var requests = 0, |
<link rel="import" href="..\..\bower_components/polymer/polymer.html"> | |
<polymer-element name="twitch-api"> | |
<template> | |
<link rel="stylesheet" href="twitch-api.css" attributes="clientId"> | |
</template> | |
<script> | |
(function () { | |
Polymer({ | |
twitchUrl: 'https://api.twitch.tv/kraken/', |
function elementChildren (element) { | |
var childNodes = element.childNodes, | |
children = [], | |
i = childNodes.length; | |
while (i--) { | |
if (childNodes[i].nodeType == 1) { | |
children.unshift(childNodes[i]); | |
} | |
} |
var user = {name: "dummy", uid: "demo"}; | |
var data; | |
var text = ""; | |
for (data in user) { | |
text += user[data]; | |
} |
if (window.addEventListener) { | |
window.addEventListener("storage", onStorage, false); | |
} else { | |
window.attachEvent("onstorage", onStorage); | |
}; | |
var onStorage = function(data) { | |
// Receive changes in the localStorage | |
} |
// repeat x times | |
var quantity = 10; | |
for (var i = 1; i <=quantity; i++) { | |
console.log('Runned: ' + i + 'time(s)' ); | |
} |
<script> | |
var BasicElements = BasicElements || {}; | |
/** | |
* @demo demo/index.html | |
* @polymerBehavior BasicElements.pageSelectedBehavior | |
*/ | |
BasicElements.pageSelectedBehaviorImpl = { | |
properties: { | |
animate: { | |
type: Boolean, |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<link rel="import" href="../components/polymer/polymer.html"> | |
<template id="test-element"> | |
Hello, <content></content>. | |
</template> |
When not in Developer Mode check the official chromium poking-around-your-chrome-os-device page.