all files / src/visualizations/ iframe.js

33.33% Statements 3/9
100% Branches 0/0
0% Functions 0/1
33.33% Lines 3/9
1 2 3 4 5 6 7 8 9 10 11 12 13                    
const $ = require('jquery');
 
function iframeWidget(slice) {
  $('#code').attr('rows', '15');
  const url = slice.render_template(slice.formData.url);
  slice.container.html('<iframe style="width:100%;"></iframe>');
  const iframe = slice.container.find('iframe');
  iframe.css('height', slice.height());
  iframe.attr('src', url);
}
 
module.exports = iframeWidget;