I'm utilizing angularJS, lo-dash.js, and coffeescript in my project.
Here is the code snippet I am currently using:
const div = document.getElementById('play');
const iframe = document.createElement('iframe');
iframe.id='iframe_played';
iframe.width = '420';
iframe.height = '315';
iframe.src = './home.html#/video/'+ currentMarker.id;
iframe.frameborder = '0';
iframe.allowfullscreen = 'true';
iframe.webkitallowfullscreen = 'true';
iframe.mozallowfullscreen = 'true';
div.appendChild(iframe);
This implementation seems a bit messy. Although it would be easier with jQuery, I have chosen not to import it as recommended by AngularJS. Are there any suggestions on how I can refactor this code? While putting everything in CSS may be an option, the dynamic nature of src
and lack of support for allowfullscreen
in CSS are limiting factors. Thank you!