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
- Host: GitHub
- URL: https://github.com/morulus/quart
- Owner: morulus
- Created: 2016-08-20T21:38:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-09-01T13:12:59.000Z (almost 10 years ago)
- Last Synced: 2025-06-10T09:41:17.635Z (about 1 year ago)
- Language: JavaScript
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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)