adobe-webplatform / dropcap.js

Beautiful CSS drop caps made easy
Other
929 stars 70 forks source link

Make package loadable in Node #17

Closed darobin closed 8 years ago

darobin commented 8 years ago

Currently the package assumes it is loaded in a browser environment that has a window defined. That is necessary for it to do something, but it should not prevent it from just being loaded.

The reason this matters (to us and presumably others) is because we do isomorphic JS by properly loading the full page and generating the HTML on the server side. Stuff that is purely client-side like Dropcap.js does not get executed, but it does get loaded. The window reference causes it all to just blow up.