youtube-iframe
Advanced tools
Comparing version 1.0.1 to 1.0.2
12
index.js
@@ -9,6 +9,9 @@ (function(window) { | ||
load: function(callback) { | ||
var _this = this; | ||
this.listeners.push(callback); | ||
if(this.loaded) { | ||
this.done(); | ||
setTimeout(function() { | ||
_this.done(); | ||
}); | ||
return; | ||
@@ -23,3 +26,2 @@ } | ||
var _this = this; | ||
window.onYouTubeIframeAPIReady = function() { | ||
@@ -39,7 +41,5 @@ _this.loaded = true; | ||
for(var listenerIndex = 0; listenerIndex < this.listeners.length; listenerIndex++) { | ||
this.listeners[listenerIndex](window.YT); | ||
while(this.listeners.length) { | ||
this.listeners.pop()(window.YT); | ||
} | ||
this.listeners.length = 0; | ||
} | ||
@@ -46,0 +46,0 @@ }; |
{ | ||
"name": "youtube-iframe", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Wrapper for dynamically loading the YouTube iframe api script", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -34,4 +34,9 @@ # youtube-iframe | ||
### 1.0.2 | ||
* Always call the callback asynchronously (#2) | ||
* Fixed a bug with infinite recursion when nesting load() calls | ||
### 1.0.1 | ||
* Always use https instead of the protocol-relative URL (#1) |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4713
41
41