An open API service indexing awesome lists of open source software.

https://github.com/morulus/quart

API for build chrome extensions with remote methods between content and background
https://github.com/morulus/quart

Last synced: 11 months ago
JSON representation

API for build chrome extensions with remote methods between content and background

Awesome Lists containing this project

README

          

Quart
--

# Getting started
Quart - is an API, that helping to connect chrome extension's background script and page script via remote methods.

Both scripts should to pre-build through webpack or another bundler.

## On content script
```js
var Quart = require('quart').ContentScript;
Quart.methods({
sayHello: function(name) {
return 'Hello, '+name;
}
})
```

## On background script
```js
var Quart = require('quart').BackgroundScript;
Quart.call('sayHello', ['Quart'], function(err, result) {
console.log('result'); // Hello, Quart
});
```

## License
MIT, 2016

## Attention! Early development stage.
**The code of library is very young. Minimum tests and practical usage. I'm not sure You should to use it in your extensions now.**

## Author
Vladimir Kalmykov (http://github.com/morulus)