I'm using angularJS (without jQuery), lo-dash.js and coffeescript..
Below is my codes:
div = document.getElementById('play')
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);
which looks a little clumsy.. I know it would be super easy if I could use jQuery but unfortunately I didn't import jQuery becasue AngularJS recommend not to do this..
Does anyone have suggestions about refactoring them? (The best way may be put them all in css.. But the src
should be dynamic and allowfullscreen
seems not supported by CSS..) Thanks!