Browse Source

spelling: listener

pull/4067/head
Josh Soref 8 years ago
parent
commit
b197250074
1 changed files with 3 additions and 3 deletions
  1. 6
      examples/assets/library/iframe-content.js

6
examples/assets/library/iframe-content.js

@ -343,10 +343,10 @@
} }
} }
function setupInjectElementLoadListners(mutations){
function setupInjectElementLoadListeners(mutations){
function addLoadListener(element){ function addLoadListener(element){
if (element.height === undefined || element.width === undefined || 0 === element.height || 0 === element.width){ if (element.height === undefined || element.width === undefined || 0 === element.height || 0 === element.width){
log('Attach listerner to '+element.src);
log('Attach listener to '+element.src);
addEventListener(element,'load', function imageLoaded(){ addEventListener(element,'load', function imageLoaded(){
sendSize('imageLoad','Image loaded'); sendSize('imageLoad','Image loaded');
}); });
@ -384,7 +384,7 @@
observer = new MutationObserver(function(mutations) { observer = new MutationObserver(function(mutations) {
sendSize('mutationObserver','mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type); sendSize('mutationObserver','mutationObserver: ' + mutations[0].target + ' ' + mutations[0].type);
setupInjectElementLoadListners(mutations); //Deal with WebKit asyncing image loading when tags are injected into the page
setupInjectElementLoadListeners(mutations); //Deal with WebKit asyncing image loading when tags are injected into the page
}); });
log('Enable MutationObserver'); log('Enable MutationObserver');

Loading…
Cancel
Save