Namespace: Function

SuperMap. Function static

函数操作的一系列常用扩展函数.

Methods

SuperMap.Function.bind(func, object){function}

common/commontypes/BaseTypes.js, line 356

绑定函数到对象.方便创建this的作用域.

Name Type Description
func function

输入函数.

object Object

对象绑定到输入函数(作为输入函数的this对象).

Returns:
Type Description
function object参数作为func函数的this对象.

SuperMap.Function.bindAsEventListener(func, object){function}

common/commontypes/BaseTypes.js, line 375

绑定函数到对象,在调用该函数时配置并使用事件对象作为第一个参数.

Name Type Description
func function

用于监听事件的函数.

object Object

this 对象的引用.

Returns:
Type Description
function

SuperMap.Function.False(){Boolean}

common/commontypes/BaseTypes.js, line 387

该函数仅仅返回false.该函数主要是避免在IE8以下浏览中DOM事件句柄的匿名函数问题.

Returns:
Type Description
Boolean
Example
document.onclick = SuperMap.Function.False;

SuperMap.Function.True(){Boolean}

common/commontypes/BaseTypes.js, line 397

该函数仅仅返回true.该函数主要是避免在IE8以下浏览中DOM事件句柄的匿名函数问题.

Returns:
Type Description
Boolean
Example
document.onclick = SuperMap.Function.True;

SuperMap.Function.Void(){undefined}

common/commontypes/BaseTypes.js, line 405

可重用函数,仅仅返回"undefined".

Returns:
Type Description
undefined