mirror of
https://github.com/konvajs/konva.git
synced 2025-04-05 20:48:28 +08:00
Added support for nw.js (node-webkit)
This commit is contained in:
parent
796f949a31
commit
3366de1edf
@ -369,10 +369,10 @@ var Konva = {};
|
||||
( function(root, factory) {
|
||||
if( typeof exports === 'object') {
|
||||
var KonvaJS = factory();
|
||||
// runtime-check for browserify
|
||||
if(global.window === global) {
|
||||
Konva.document = global.document;
|
||||
Konva.window = global;
|
||||
// runtime-check for browserify and nw.js (node-webkit)
|
||||
if(global.window && global.window.document) {
|
||||
Konva.document = global.window.document;
|
||||
Konva.window = global.window;
|
||||
} else {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like enviroments that support module.exports,
|
||||
|
Loading…
Reference in New Issue
Block a user