Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@pennyfx
Created September 14, 2012 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pennyfx/3723388 to your computer and use it in GitHub Desktop.
Save pennyfx/3723388 to your computer and use it in GitHub Desktop.
x-indexDb scraps
//
// Persistence and databinding tag thoughts
//
// Add one of these for each entity you want indexDb persistence
<x-indexdb for="x-todo-item" path="todoapp.todo-item">
<x-indexdb for="x-user-preferences" path="todoapp.preferences">
//when injected into the DOM will auto request data and inflate
<x-todo-item data-id="1">
// another possibility is to define schema and validators
<x-indexdb for="x-todo-item" path="todoapp.todo-item" schema="TBD" validation="TBD">
<x-validator type="length" min-length="0" max-length="120" />
<x-validator type="number" />
// How about a RESTful storage persistence provider?
// you give it a resource route and it issues GET/POST/PUT/DELETE ajax actions to your webserver
<x-restserver for="x-todo-item" path="/todo/">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment