I have extension for Chrome for seek a request and response headers. I am using webRequest.onSendHeaders, webRequest.onHeadersReceived and webRequest.onCompleted events for this. But i not see headers for load Flash. How i can do it?
Asked
Active
Viewed 297 times
0

Wladimir Palant
- 56,865
- 12
- 98
- 126
-
Okay, i understand - the webRequest.onCompleted event bong, before begins Flash load. How i can wait to load all Flash? – Vasiliy Shpilchin May 17 '12 at 11:39
1 Answers
1
Flash objects have PercentLoaded()
method. Use it like this:
var testMovie = document.testMovie;
function waitUntilLoaded()
{
if(testMovie.PercentLoaded() == 100) {
doSomething();//flash is loaded
} else {
setTimeout('waitUntilLoaded()',10);
}
}
waitUntilLoaded();
You will probably need a content script for this.

Konrad Dzwinel
- 36,825
- 12
- 98
- 105
-
Does that approach allow looking at request headers? Because that's what the question is about... – Wladimir Palant May 17 '12 at 20:02
-
Hm, you are right - I answered the question from comment: "How i can wait to load all Flash?" – Konrad Dzwinel May 17 '12 at 20:53