Index: ppapi/native_client/src/trusted/plugin/plugin.cc |
diff --git a/ppapi/native_client/src/trusted/plugin/plugin.cc b/ppapi/native_client/src/trusted/plugin/plugin.cc |
index 24a0157d35cf924522be5be73671e7af74a0a789..589de9f3bc01bbc53154722e2e2ec6250e49a22f 100644 |
--- a/ppapi/native_client/src/trusted/plugin/plugin.cc |
+++ b/ppapi/native_client/src/trusted/plugin/plugin.cc |
@@ -1975,11 +1975,13 @@ void Plugin::DispatchProgressEvent(int32_t result) { |
static const char* kEventClosureJS = |
"(function(target, type, url," |
" lengthComputable, loadedBytes, totalBytes) {" |
- " var progress_event = document.createEvent('ProgressEvent');" |
- " progress_event.initProgressEvent(type, false, true," |
- " lengthComputable," |
- " loadedBytes," |
- " totalBytes);" |
+ " var progress_event = new ProgressEvent(type, {" |
+ " bubbles: false," |
polina
2011/11/07 19:42:06
this is so much easier to read!
|
+ " cancelable: true," |
+ " lengthComputable: lengthComputable," |
+ " loaded: loadedBytes," |
+ " total: totalBytes" |
+ " });" |
" progress_event.url = url;" |
" target.dispatchEvent(progress_event);" |
"})"; |