(imageReady)
| 1 | 'use strict'; |
| 2 | |
| 3 | function loadImage(imageReady) { |
| 4 | if (typeof window === 'undefined') { // We're in NodeJS |
| 5 | loadInNode(imageReady); |
| 6 | } else { // We're in the browser |
| 7 | if (typeof window._phantom !== 'undefined') { |
| 8 | loadInPhantom(imageReady); |
| 9 | } else { |
| 10 | loadInRealBrowser(imageReady); |
| 11 | } |
| 12 | } |
| 13 | } |
| 14 | |
| 15 | function loadInNode(imageReady) { |
| 16 | var fs = require('fs'); |
no test coverage detected
searching dependent graphs…