concord-consortium / shutterbug

A rack utility using phantomjs that will create and save images (pngs) for a part of your web page's current dom. These images become available as public '.png' resources in the rack application. Currently shutterbug supports HTML, SVG and Canvas elements.
Other
27 stars 3 forks source link

iframe Messaging should be more defensive. Chokes on non-json messages. #5

Closed knowuh closed 11 years ago

knowuh commented 11 years ago

For instance: We shouldn't just assume that because the message is a string, that it will be valid json.

var htmlFragRequestListen = function(message) {
  var data = message.data;
  if (typeof data === 'string') {
    data = JSON.parse(data);
  }  .....
knowuh commented 11 years ago

Closed by 7131e23fd4a4a0bca72c74d13cde0043e089e762