Skip to content

Instant API - Inter-document, cross domain communication framework

Notifications You must be signed in to change notification settings

jethrolarson/ark-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arc.js - Instant API

Licence

Pick any of the following WTFPL, MIT, or GPL

Client Example

On the page that wants to use the API

new ArcClient("index.html").sendMessage('subscribePosts', {}, function(data){
  $("#tweets").append("<li>"+data.message+"</li>");
});

"Server" Example

On the page that wants to provide the API

new ArcServer({
  'subscribePosts':{
    onMessage: function(e){
      self.sendMessage(e,$('.update:first').html());
    }
  }
});

About

Instant API - Inter-document, cross domain communication framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published