Để chọn, bạn cần định nghĩa hàm wrapper −
function display ( file ) { if ( window.webkitURL ) { return window.webkitURL.createObjectURL( file ); } else if ( window.URL && window.URL.createObjectURL ) { return window.URL.display( file ); } else { return null; } }Sau đó thiết lập cho cross-browser −
var url = display( file );