npm i pemrouz/ripple
localStorage
. localStorage
and then be updated when the client connects to the server and streams the latest versions. localStorage
can even be faster than the browser cache.
ripple('tweets').push('hello world!')
<script src="https://cdn.rawgit.com/pemrouz/ripple/master/dist/client.min.js"></script>
<twitter-feed data='tweets'> <twitter-count data='tweets'>
/tweets/latest/10
vs tweets
)
resources
folder
ripple('name')
ripple('name', body)
ripple('name', body, headers)
ripple.resource('name', body, headers)
ripple('name').on('response', function)
ripple('name').once('response', function)
ripple.draw()
ripple.draw(element)
ripple.draw.call(element)
ripple.draw('name')
MutationObserver(ripple.draw)
ripple.version('name')
ripple.version('name', i)
ripple.version()
ripple.version(i)
ripple.db('type://user:pass@host:port/dbname')
ripple.use(ripple2)
window.createRipple
require('ripple')(server, opts)
<component-name is="component-name" data="name(s)" template="name" css="name" inert delay="ms" realtime>
<time is="relative-time">
<fast-grid data="prices instruments" realtime>
<event-item data="events" id="519" template="event-item.html">
[header] content-type
ripple('tweets', [], { 'content-type': 'application/data' })
[header] content-location (alias: table)
ripple('users', [], { 'table': 'members' })
[header] private
ripple('credit-cards', [], { private: true })
[header] proxy-to (alias: to)
ripple('users', [], { to: reduceToNumber })
[header] proxy-from (alias: from)
ripple('read-only-data', [], { from: ignoreChages })
[header] max-versions
ripple('frequently-updated-data', [], { 'max-versions': 0 })
[header] extends
ripple('color-picker', require('./picker'), { 'extends': 'input' })