Skip to content

fix: wrap constructor in a factory function so callable from node.js#973

Closed
hburrows wants to merge 1 commit intohammerjs:masterfrom
hburrows:wrap-constructor-in-factory-function
Closed

fix: wrap constructor in a factory function so callable from node.js#973
hburrows wants to merge 1 commit intohammerjs:masterfrom
hburrows:wrap-constructor-in-factory-function

Conversation

@hburrows
Copy link

@hburrows hburrows commented May 5, 2016

Fixes #930. This wraps the constructor in a factory function that is callable from both browser and backend server environments which is necessary for server side rendering (via React, etc.). The implementation uses a jQuery style approach by returning a factory function when window or window.document are not available that can be used for later initialization.

@hburrows hburrows changed the title fix: wrap constructor in a factory function so callable from both bro… fix: wrap constructor in a factory function so callable from both node.js May 5, 2016
@hburrows hburrows changed the title fix: wrap constructor in a factory function so callable from both node.js fix: wrap constructor in a factory function so callable from node.js May 5, 2016
@jaylaw81
Copy link

jaylaw81 commented Aug 8, 2016

Were running into this issue in our builds. Do you know when this will merge into master?

@Doubl3
Copy link

Doubl3 commented Dec 22, 2016

Is there any "merge into master" activity planned to fix this "no go like" issue ?

@arschmitz
Copy link
Contributor

arschmitz commented Dec 22, 2016

This PR is not valid any longer the whole structure of the project has changed since this

@arschmitz arschmitz closed this Dec 22, 2016
@andypmw
Copy link

andypmw commented Apr 20, 2017

But . . . oh my . . .

@paranoidjk
Copy link

I think it shouldn't be closed, since #930 is still a problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hammer.js fails in node since window is undefined

6 participants