Skip to content

hezedu/event-transfer-jsonp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

eventTransferJsonp

It used event to transfer data, fix the callback name. good for http cache.

install

npm install event-transfer-jsonp

The expose name is eventTransferJsonp. support AMD,commonjs.

API

eventTransferJsonp(url, callback)

example

eventTransferJsonp('/someurl', function(err, data){
  if(err){ //the err just a event
    return console.log('error', err);
  }
  console.log(data);
})

Don't support IE!

QA

Can i modify the callbackName ?

No

About

Fixed the callback name. Good for http cache.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published