Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/bootstrap.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfat <fat@folders.local>2015-05-14 00:46:50 +0300
committerfat <fat@folders.local>2015-05-14 00:46:50 +0300
commiteaab1def7af7d7e1ab32ff69d043b46e2815ca22 (patch)
tree495965eef95b6c7e1ca485c04311e6e451695b29 /js/dist/scrollspy.js
parentc2ced2292a6467b9c8a9fec3151982fd7ac8a239 (diff)
add simple type checker implementation
Diffstat (limited to 'js/dist/scrollspy.js')
-rw-r--r--js/dist/scrollspy.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/js/dist/scrollspy.js b/js/dist/scrollspy.js
index 47774a95b1..b214f86eeb 100644
--- a/js/dist/scrollspy.js
+++ b/js/dist/scrollspy.js
@@ -32,6 +32,12 @@ var ScrollSpy = (function ($) {
target: ''
};
+ var DefaultType = {
+ offset: 'number',
+ method: 'string',
+ target: '(string|element)'
+ };
+
var Event = {
ACTIVATE: 'activate' + EVENT_KEY,
SCROLL: 'scroll' + EVENT_KEY,
@@ -155,6 +161,8 @@ var ScrollSpy = (function ($) {
config.target = '#' + id;
}
+ Util.typeCheckConfig(NAME, config, DefaultType);
+
return config;
}
}, {