mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 934053 - log media element events for debugging. r=cpearce
This commit is contained in:
parent
2806379310
commit
f3dd53ea1d
@ -39,6 +39,19 @@ function playElement(e) {
|
||||
function loadedAll(elementList) {
|
||||
elements = elementList;
|
||||
|
||||
// Log events for debugging.
|
||||
var events = ["suspend", "play", "canplay", "canplaythrough", "loadstart", "loadedmetadata",
|
||||
"loadeddata", "playing", "ended", "error", "stalled", "emptied", "abort",
|
||||
"waiting", "pause"];
|
||||
function logEvent(e) {
|
||||
info(e.target._name + ": got " + e.type);
|
||||
}
|
||||
elementList.forEach(function(element) {
|
||||
events.forEach(function(evt) {
|
||||
element.addEventListener(evt, logEvent, false);
|
||||
});
|
||||
});
|
||||
|
||||
// Blow away the subframe
|
||||
document.body.removeChild(document.getElementById("frame"));
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user