-
Notifications
You must be signed in to change notification settings - Fork 3
jquery 1.4.2.externs
revelation edited this page Dec 6, 2010
·
2 revisions
/*
* Copyright 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* @fileoverview Externs for jQuery 1.4.2.
* The externs defined here are in the order of the jQuery 1.3.2 (HA HA!) documentation pages.
* Note that some functions use different return types depending on the number
* of parameters passed in. In this cases, you may need to annotate the type
* of the result in your code, so the JSCompiler understands which type you're
* expecting. For example:
* <code>var elt = /** @type {Element} * / (foo.get(0));</code>
* @see http://docs.jquery.com/
*
*/
/**
* @param {(string|Node|Element|Array.<Element>|jQueryObject|Function)=} arg
* @param {(Element|jQueryObject|Document|Object)=} opt_arg
* @return {jQueryObject}
*/
var $ = function(arg, opt_arg) {};
var jQuery = {};
/** @constructor */
function jQueryObject() {};
// http://docs.jquery.com/Core - Object accessors
/**
* @param {Function} callback
* @return {jQueryObject}
*/
jQueryObject.prototype.each = function(callback) {};
/** @return {number} */
jQueryObject.prototype.size = function() {};
/** @type {number} */
jQueryObject.prototype.length;
/** @return {string} */
jQueryObject.prototype.selector = function() {};
/** @return {Element} */
jQueryObject.prototype.context = function() {};
/**
* @param {number=} opt_index
* @return {Element|Array.<Element>}
*/
jQueryObject.prototype.get = function(opt_index) {};
/**
* @param {(string|Element|jQueryObject)=} subject
* @return {number}
*/
jQueryObject.prototype.index = function(subject) {};
// http://docs.jquery.com/Core - Data
/**
* @param {(Object|string)=} name
* @param {*=} opt_value
* @return {*}
*/
jQueryObject.prototype.data = function(name, opt_value) {};
/**
* @param {string} name
* @return {jQueryObject}
*/
jQueryObject.prototype.removeData = function(name) {};
/**
* @param {(string|Function|Array.<Function>)=} opt_arg1
* @param {(Function|Array.<Function>)=} opt_arg2
* @return {Array.<Function>|jQueryObject}
*/
jQueryObject.prototype.queue = function(opt_arg1, opt_arg2) {};
/**
* @param {string=} opt_name
* @return {jQueryObject}
*/
jQueryObject.prototype.dequeue = function(opt_name) {};
// http://docs.jquery.com/Attributes - Attr
/**
* @param {string|Object} nameOrProperties
* @param {*=} opt_value
* @return {Object|jQueryObject}
*/
jQueryObject.prototype.attr = function(nameOrProperties, opt_value) {};
/**
* @param {string} name
* @return {jQueryObject}
*/
jQueryObject.prototype.removeAttr = function(name) {};
// http://docs.jquery.com/Attributes - Class
/**
* @param {string|function(number, string):string} klass
* @return {jQueryObject}
*/
jQueryObject.prototype.addClass = function(klass) {};
/**
* @param {string} klass
* @return {boolean}
*/
jQueryObject.prototype.hasClass = function(klass) {};
/**
* @param {(string|function(number, string):string)=} opt_klass
* @return {jQueryObject}
*/
jQueryObject.prototype.removeClass = function(opt_klass) {};
/**
* @param {string|function(number,string):string} klassOrFunction
* @param {boolean=} opt_switch
* @return {jQueryObject}
*/
jQueryObject.prototype.toggleClass = function(klassOrFunction, opt_switch) {};
// http://docs.jquery.com/Attributes - HTML, Text, Value
/**
* @param {(string|function(number, string):string)=} opt_val
* @return {string|jQueryObject}
*/
jQueryObject.prototype.html = function(opt_val) {};
/**
* @param {(string|function(number,string):string)=} opt_val
* @return {string|jQueryObject}
*/
jQueryObject.prototype.text = function(opt_val) {};
/**
* @param {(string|Array.<string>|function(number,*))=} opt_val
* @return {string|Array|jQueryObject}
*/
jQueryObject.prototype.val = function(opt_val) {};
// http://docs.jquery.com/Traversing - Filtering
/**
* @param {number} index
* @return {jQueryObject}
*/
jQueryObject.prototype.eq = function(index) {};
/**
* @param {string|Function} arg
* @return {jQueryObject}
*/
jQueryObject.prototype.filter = function(arg) {};
/**
* @param {string} expr
* @return {boolean}
*/
jQueryObject.prototype.is = function(expr) {};
/**
* @param {Function} callback
* @return {jQueryObject}
*/
jQueryObject.prototype.map = function(callback) {};
/**
* @param {string|Element|Array.<Element>|function(number):boolean} expr
* @return {jQueryObject}
*/
jQueryObject.prototype.not = function(expr) {};
/**
* @param {number} start
* @param {number=} opt_end
* @return {jQueryObject}
*/
jQueryObject.prototype.slice = function(start, opt_end) {};
// http://docs.jquery.com/Traversing - Finding, Chaining
/**
* @param {string|Element|Array.<Element>} expr
* @param {Element=} context
* @return {jQueryObject}
*/
jQueryObject.prototype.add = function(expr, context) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.children = function(opt_expr) {};
/**
* @param {string} expr
* @param {Element=} context
* @return {jQueryObject}
*/
jQueryObject.prototype.closest = function(expr, context) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.contents = function() {};
/**
* @param {string} expr
* @return {jQueryObject}
*/
jQueryObject.prototype.find = function(expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.next = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.nextAll = function(opt_expr) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.offsetParent = function() {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.parent = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.parents = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.prev = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.prevAll = function(opt_expr) {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.siblings = function(opt_expr) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.andSelf = function() {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.end = function() {};
// http://docs.jquery.com/Manipulation
/**
* @param {string|Element|jQueryObject|function(number, string):string} content
* @return {jQueryObject}
*/
jQueryObject.prototype.append = function(content) {};
/**
* @param {string} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.appendTo = function(selector) {};
/**
* @param {string|Element|jQueryObject|function(number, string):string} content
* @return {jQueryObject}
*/
jQueryObject.prototype.prepend = function(content) {};
/**
* @param {string} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.prependTo = function(selector) {};
/**
* @param {string|Element|jQueryObject|function(number):string } content
* @return {jQueryObject}
*/
jQueryObject.prototype.after = function(content) {};
/**
* @param {string|Element|jQueryObject|function():string} content
* @return {jQueryObject}
*/
jQueryObject.prototype.before = function(content) {};
/**
* @param {string} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.insertAfter = function(selector) {};
/**
* @param {string} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.insertBefore = function(selector) {};
/**
* @param {string|jQueryObject|Element|Function} arg
* @return {jQueryObject}
*/
jQueryObject.prototype.wrap = function(arg) {};
/**
* @param {string|jQueryObject|Element} arg
* @return {jQueryObject}
*/
jQueryObject.prototype.wrapAll = function(arg) {};
/**
* @param {string|jQueryObject|Element|Function} arg
* @return {jQueryObject}
*/
jQueryObject.prototype.wrapInner = function(arg) {};
/**
* @param {string|Element|jQueryObject|Function} content
* @return {jQueryObject}
*/
jQueryObject.prototype.replaceWith = function(content) {};
/**
* @param {string} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.replaceAll = function(selector) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.empty = function() {};
/**
* @param {string=} opt_expr
* @return {jQueryObject}
*/
jQueryObject.prototype.remove = function(opt_expr) {};
/**
* @param {boolean=} opt_cloneEvents
* @return {jQueryObject}
*/
jQueryObject.prototype.clone = function(opt_cloneEvents) {};
// http://docs.jquery.com/CSS
/**
* @param {string|Object} nameOrProperties
* @param {(string|number|Function)=} opt_value
* @return {Object|jQueryObject|string}
*/
jQueryObject.prototype.css = function(nameOrProperties, opt_value) {};
/**
* @param {(Object|function(number, Object):Object)=} objectOrFunction
* @return {Object|jQueryObject}
*/
jQueryObject.prototype.offset = function(objectOrFunction) {};
/**
* @return {Object}
*/
jQueryObject.prototype.position = function() {};
/**
* @param {number=} opt_val
* @return {number|jQueryObject}
*/
jQueryObject.prototype.scrollTop = function(opt_val) {};
/**
* @param {number=} opt_val
* @return {number|jQueryObject}
*/
jQueryObject.prototype.scrollLeft = function(opt_val) {};
/**
* @param {number=} opt_val
* @return {number|jQueryObject}
*/
jQueryObject.prototype.height = function(opt_val) {};
/**
* @param {number=} opt_val
* @return {number|jQueryObject}
*/
jQueryObject.prototype.width = function(opt_val) {};
/**
* @return {number}
*/
jQueryObject.prototype.innerHeight = function() {};
/**
* @return {number}
*/
jQueryObject.prototype.innerWidth = function() {};
/**
* @param {boolean=} opt_margin
* @return {number}
*/
jQueryObject.prototype.outerHeight = function(opt_margin) {};
/**
* @param {boolean=} opt_margin
* @return {number}
*/
jQueryObject.prototype.outerWidth = function(opt_margin) {};
// http://docs.jquery.com/Events
/**
* @param {string} type
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.live = function(type, fn) {};
/**
* @param {string=} opt_type
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.die = function(opt_type, opt_fn) {};
/**
* @param {Function} over
* @param {Function} out
* @return {jQueryObject}
*/
jQueryObject.prototype.hover = function(over, out) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.blur = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.change = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.click = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.dblclick = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.error = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.focus = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.keydown = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.keypress = function(opt_fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.keyup = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.load = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mousedown = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseenter = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseleave = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mousemove = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseout = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseover = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.mouseup = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.resize = function(fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.scroll = function(fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.select = function(opt_fn) {};
/**
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.submit = function(opt_fn) {};
/**
* @param {Function} fn
* @return {jQueryObject}
*/
jQueryObject.prototype.unload = function(fn) {};
// http://docs.jquery.com/Effects
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.show = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.hide = function(opt_speed, opt_fn) {};
/**
* toggle() is defined as both an event and an effect... sigh.
* @param {(Function|boolean|number|string)=} opt_arg1
* @param {Function=} opt_fn2
* @param {...Function} var_args
* @return {jQueryObject}
*/
jQueryObject.prototype.toggle = function(opt_arg1, opt_fn2, var_args) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.slideDown = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.slideUp = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.slideToggle = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.fadeIn = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.fadeOut = function(opt_speed, opt_fn) {};
/**
* @param {(number|string)=} opt_speed
* @param {number=} opt_opacity
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.fadeTo = function(opt_speed, opt_opacity, opt_fn) {};
/**
* @param {Object} params
* @param {(number|string|Object)=} opt_durationOrOptions
* @param {string=} opt_easing
* @param {Function=} opt_fn
* @return {jQueryObject}
*/
jQueryObject.prototype.animate = function(
params, opt_durationOrOptions, opt_easing, opt_fn) {};
/**
* @param {boolean} opt_clearQueue
* @param {boolean} opt_gotoEnd
* @return {jQueryObject}
*/
jQueryObject.prototype.stop = function(opt_clearQueue, opt_gotoEnd) {};
/**
* @param {string|Object} events
* @param {Object=} eventData
* @param {Function=} handler
* @return {jQueryObject}
*/
jQueryObject.prototype.bind = function(events, eventData, handler) {};
/**
* @param {string|Object} eventType
* @param {Function=} handler
* @return {jQueryObject}
*/
jQueryObject.prototype.unbind = function(eventType, handler) {};
/**
* @param {string=} queueName
* @return {jQueryObject}
*/
jQueryObject.prototype.clearQueue = function(queueName) {};
/**
* @param {number} duration
* @param {string=} queueName
* @return {jQueryObject}
*/
jQueryObject.prototype.delay = function(duration, queueName) {};
/**
* @param {string=} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.detach = function(selector) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.first = function() {};
/**
* @param {string=} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.detach = function(selector) {};
/**
* @param {function(Object)} handler
* @return {jQueryObject}
*/
jQueryObject.prototype.focusin = function(handler) {};
/**
* @param {function(Object)} handler
* @return {jQueryObject}
*/
jQueryObject.prototype.focusout = function(handler) {};
/**
* @param {string|Element} selectorOrElement
* @return {jQueryObject}
*/
jQueryObject.prototype.has = function(selectorOrElement) {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.last = function() {};
/**
* @param {string=} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.nextUntil = function(selector) {};
/**
* @param {string=} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.parentsUntil = function(selector) {};
/**
* @param {string=} selector
* @return {jQueryObject}
*/
jQueryObject.prototype.prevUntil = function(selector) {};
/**
* @return {Array}
*/
jQueryObject.prototype.toArray = function() {};
/**
* @return {jQueryObject}
*/
jQueryObject.prototype.unwrap = function() {};
/**
* @param {Element} element
* @param {string} key
* @param {*=} value
* @return {jQueryObject|Object}
*/
jQuery.data = function(element, key, value) {};
/**
* @param {Object} obj
* @return {boolean}
*/
jQuery.isEmptyObject = function(obj) {};
/**
* @param {Object} obj
* @return {boolean}
*/
jQuery.isPlainObject = function(obj) {};
/**
* @return {Function}
*/
jQuery.noop = function() {};
/**
* @param {Array|Object} arrayOrObject
* @param {boolean=} traditional
* @return {string}
*/
jQuery.param = function(arrayOrObject, traditional) {};
/**
* @param {Function|Object} functionOrContext
* @param {Object|string} contextOrName
* @return {Function}
*/
jQuery.proxy = function(functionOrContext, contextOrName) {};
/**
* @param {string} str
* @return {string}
*/
jQuery.trim = function(str) {};
jQuery.fx = {};
/** @type {boolean} */
jQuery.fx.off;