Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

2.0 Override RSVP

Tres Finocchiaro edited this page Jan 13, 2016 · 9 revisions

Description

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(...). Examples for BlueBird and Q are provided below.

BlueBird

  1. 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

  1. Override RSVP with Bluebird using qz.api.setPromiseType(...).
qz.api.setPromiseType(Promise.fromCallback);

Q

  1. 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

  1. Override RSVP with Q using qz.api.setPromiseType(...).
qz.api.setPromiseType(Q.Promise);