lib/shutterbug/shutterbug.js in shutterbug-0.0.9 vs lib/shutterbug/shutterbug.js in shutterbug-0.0.10

- old
+ new

@@ -136,11 +136,14 @@ html = data.value; shutterbugInstance.getPng(html); } } }; - window.addEventListener('message', htmlFragRequestListen, false); - window.addEventListener('message', htmlFragResponseListen, false); + + $(document).ready(function () { + window.addEventListener('message', htmlFragRequestListen, false); + window.addEventListener('message', htmlFragResponseListen, false); + }); return shutterbugInstance; }; })(); \ No newline at end of file