var tag=document.createElement("script");
tag.src = "https://www.youtube.com/iframe_api";//js work
import js.Browser;
class YoutubePlayer {
public function new() {
var tag = Browser.document.createElement('script');
tag.src = "https://www.youtube.com/iframe_api";//error here.
}
public static function main() {
var p=new YoutubePlayer();
trace(p);
}
}