Skip to content

Instantly share code, notes, and snippets.

@philippeback
Created August 26, 2014 20:12
Show Gist options
  • Save philippeback/2215d62ecc0c6968054b to your computer and use it in GitHub Desktop.
Save philippeback/2215d62ecc0c6968054b to your computer and use it in GitHub Desktop.
addMarkerPollingTo: html
html document addLoadScript: (
(
(html jQuery getJson
json: [ :r | self renderStoresJsonOn: r ];
onSuccess: (JSStream on: 'window.timeoutHandler=setTimeout(updateMarkers,30000)') asFunction
) asFunction assignTo: 'updateMarkers')
).
html document addLoadScript: (JSStream on: 'updateMarkers()').
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment