Skip to content

Instantly share code, notes, and snippets.

@webOS101
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save webOS101/4f55c778aee7c7bf4ddc to your computer and use it in GitHub Desktop.
Save webOS101/4f55c778aee7c7bf4ddc to your computer and use it in GitHub Desktop.
RestaurantModel
<div id="jsconsole">
<form>
<textarea autofocus id="exec" spellcheck="false" autocapitalize="off" autofocus rows="1"> </textarea>
</form>
<div id="console">
<ul id="output"></ul>
</div>
</div>
<div id="footer"><a href="http://github.com/remy/jsconsole">Fork on Github</a> &bull; <a href="http://twitter.com/rem">Console built by @rem</a></div><script src="http://enyo-upandrunning.github.io/prettify.js"></script>
<script>
window.JSCONSOLE = {
contentWindow: this,
contentDocument: document,
console: document.getElementById('jsconsole')
};
</script>
<script src="http://enyo-upandrunning.github.io/console.js"></script>
<script>
_console.post("var mcd = new RestaurantModel({ name: 'McDonalds' });\n\nmcd.get('specialty');");
</script>
enyo.kind({
name: 'RestaurantModel',
kind: 'enyo.Model',
attributes: {
name: 'unknown',
cuisine: 'unknown',
specialty: 'unknown',
rating: 0
}
});
name: RestaurantModel
description: Derive a model kind from the default Enyo model and see it in action
authors:
- Roy Sutton
resources:
- http://enyo-upandrunning.github.io/console.css
normalize_css: no
@webOS101
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment