diff --git a/bower.json b/bower.json index 13ddd73..60be03d 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "postpone", "main": "index.js", - "version": "0.6.3", + "version": "0.6.4", "homepage": "https://github.com/lsvx/postpone", "authors": [ "Lucas Serven " diff --git a/component.json b/component.json index fd860e6..11dcd48 100644 --- a/component.json +++ b/component.json @@ -2,7 +2,7 @@ "name": "postpone", "repo": "lsvx/postpone", "description": "A polyfill for postponing the loading of media.", - "version": "0.6.3", + "version": "0.6.4", "keywords": ["postpone", "media", "resource", "priority", "download"], "dependencies": {}, "development": {}, diff --git a/index.js b/index.js index 77276f6..97478ce 100644 --- a/index.js +++ b/index.js @@ -45,7 +45,6 @@ */ this.scrollElements = []; this.setThreshold( threshold ); - this.postpone(); /** Call method to start looking for postponed media. */ return this.start(); @@ -241,6 +240,11 @@ Postpone.prototype.start = function() { /** Ensure that watching has stopped before starting to watch. */ if ( this.timeout ) this.stop(); + /** + * Call `postpone` to ensure events are bound and items in view are + * loaded. + */ + this.postpone(); /** Start watching. */ this.watch(); diff --git a/package.json b/package.json index 76a554c..0327ed3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postpone", - "version": "0.6.3", + "version": "0.6.4", "description": "A polyfill for postponing the loading of media.", "main": "index.js", "directories": { diff --git a/test/build.js b/test/build.js index 19da7d2..0e19f0a 100644 --- a/test/build.js +++ b/test/build.js @@ -247,7 +247,6 @@ require.register("postpone/index.js", Function("exports, require, module", */\n\ this.scrollElements = [];\n\ this.setThreshold( threshold );\n\ - this.postpone();\n\ \n\ /** Call method to start looking for postponed media. */\n\ return this.start();\n\ @@ -443,6 +442,11 @@ require.register("postpone/index.js", Function("exports, require, module", Postpone.prototype.start = function() {\n\ /** Ensure that watching has stopped before starting to watch. */\n\ if ( this.timeout ) this.stop();\n\ + /**\n\ + * Call `postpone` to ensure events are bound and items in view are\n\ + * loaded.\n\ + */\n\ + this.postpone();\n\ /** Start watching. */\n\ this.watch();\n\ \n\