This repository has been archived by the owner on Dec 10, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 101
2.0 Override RSVP
Tres Finocchiaro edited this page Jan 27, 2016
·
9 revisions
- ✅ 2.0 | ⛔ 1.9 | ...
QZ Tray 2.0 is bundled with RSVP to provide ECMAScript 6 Promise support. If RSVP is not desired, it can be overridden using qz.api.setPromiseType(...)
. Override examples are provided below.
- Include the new promise library:
<script type="text/javascript" src="https://cdn.jsdelivr.net/bluebird/latest/bluebird.js"></script>
or via npm :
npm install bluebird
- Override RSVP with Bluebird using
qz.api.setPromiseType(...)
.
qz.api.setPromiseType(Promise.fromCallback);
- Include the new promise library:
<script type="text/javascript" src="https://rawgit.com/kriskowal/q/v1/q.js"></script>
or via npm :
npm install q
- Override RSVP with Q using
qz.api.setPromiseType(...)
.
qz.api.setPromiseType(Q.Promise);
A hashing algorithm is required for signature validation. Use qz.setSha256Type(...)
to override the default hashing library.
qz.setSha256Type(function(data) {
return crypto.createHash('sha256').update(data).digest("hex");
}