Comparing version 0.2.1 to 0.2.2
@@ -246,2 +246,8 @@ 'use strict'; | ||
/** | ||
* trigger enabled event | ||
*/ | ||
this.triggerEvent('enabled'); | ||
document.documentElement.classList.add('swup-enabled'); | ||
/** | ||
* trigger page view event | ||
@@ -273,2 +279,5 @@ */ | ||
}); | ||
this.triggerEvent('disabled'); | ||
document.documentElement.classList.remove('swup-enabled'); | ||
} | ||
@@ -336,3 +345,2 @@ }, { | ||
} else { | ||
_this.triggerEvent('pagePreloaded'); | ||
// get json data | ||
@@ -342,2 +350,3 @@ var page = _this.getDataFromHtml(response); | ||
_this.cache.cacheUrl(page, _this.options.debugMode); | ||
_this.triggerEvent('pagePreloaded'); | ||
} | ||
@@ -344,0 +353,0 @@ resolve(); |
@@ -64,3 +64,2 @@ 'use strict'; | ||
} else { | ||
_this.triggerEvent('pageLoaded'); | ||
// get json data | ||
@@ -71,2 +70,3 @@ var page = _this.getDataFromHtml(response); | ||
_this.cache.cacheUrl(page, _this.options.debugMode); | ||
_this.triggerEvent('pageLoaded'); | ||
} | ||
@@ -73,0 +73,0 @@ resolve(); |
@@ -22,3 +22,2 @@ 'use strict'; | ||
} else { | ||
_this.triggerEvent('pagePreloaded'); | ||
// get json data | ||
@@ -28,2 +27,3 @@ var page = _this.getDataFromHtml(response); | ||
_this.cache.cacheUrl(page, _this.options.debugMode); | ||
_this.triggerEvent('pagePreloaded'); | ||
} | ||
@@ -30,0 +30,0 @@ }); |
{ | ||
"name": "swup", | ||
"version": "0.2.1", | ||
"version": "0.2.2", | ||
"description": "Animated page transitions with css - simple, quick and fun.", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -242,2 +242,4 @@ # swup | ||
* **swup:pageRetrievedFromCache** - triggers when page is retrieved from cache and no request is necessary | ||
* **swup:enabled** - triggers when swup instance is created or re-enabled after call of `destroy()` | ||
* **swup:enabled** - triggers on `destroy()` | ||
@@ -244,0 +246,0 @@ ## API |
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
107868
732
271