mirror of
https://github.com/konvajs/konva.git
synced 2025-06-28 15:23:44 +08:00
Merge pull request #37 from sibartlett/master
Added support for nw.js (node-webkit)
This commit is contained in:
commit
f9e9a48900
@ -369,10 +369,10 @@ var Konva = {};
|
|||||||
( function(root, factory) {
|
( function(root, factory) {
|
||||||
if( typeof exports === 'object') {
|
if( typeof exports === 'object') {
|
||||||
var KonvaJS = factory();
|
var KonvaJS = factory();
|
||||||
// runtime-check for browserify
|
// runtime-check for browserify and nw.js (node-webkit)
|
||||||
if(global.window === global) {
|
if(global.window && global.window.document) {
|
||||||
Konva.document = global.document;
|
Konva.document = global.window.document;
|
||||||
Konva.window = global;
|
Konva.window = global.window;
|
||||||
} else {
|
} else {
|
||||||
// Node. Does not work with strict CommonJS, but
|
// Node. Does not work with strict CommonJS, but
|
||||||
// only CommonJS-like enviroments that support module.exports,
|
// only CommonJS-like enviroments that support module.exports,
|
||||||
|
Loading…
Reference in New Issue
Block a user