English | Site Directory

gadgets.util

 SUMMARY     DETAIL

Static Class gadgets.util

Provides general-purpose utility functions.

Method Summary

<static>  String escapeString(str)
Escapes the input using html entities to make it safer.
<static>  Object getFeatureParameters(feature)
Gets the feature parameters.
<static>  Object getUrlParameters()
Gets the URL parameters.
<static>  Boolean hasFeature(feature)
Returns whether the current feature is supported.
<static> makeClosure(scope, callback, var_args)
Creates a closure that is suitable for passing as a callback.
<static> registerOnLoadHandler(callback)
Registers an onload handler.
<static>  String unescapeString(str)
Reverses escapeString.
 

Method Detail

escapeString

<static> String escapeString(str)
    Escapes the input using html entities to make it safer.
    Parameters:
      String str - The String to escape .
    Returns:
      String The escaped String.

getFeatureParameters

<static> Object getFeatureParameters(feature)
    Gets the feature parameters.
    Parameters:
      String feature - The feature to get parameters for
    Returns:
      Object The parameters for the given feature, or null

getUrlParameters

<static> Object getUrlParameters()
    Gets the URL parameters.
    Returns:
      Object Parameters passed into the query string

hasFeature

<static> Boolean hasFeature(feature)
    Returns whether the current feature is supported.
    Parameters:
      String feature - The feature to test for
    Returns:
      Boolean True if the feature is supported

makeClosure

<static> makeClosure(scope, callback, var_args)
    Creates a closure that is suitable for passing as a callback. Any number of arguments may be passed to the callback; they will be received in the order they are passed in.
    Parameters:
      Object scope - The execution scope; may be null if there is no need to associate a specific instance of an object with this callback
      Function callback - The callback to invoke when this is run; any arguments passed in will be passed after your initial arguments
      Object var_args - Initial arguments to be passed to the callback

registerOnLoadHandler

<static> registerOnLoadHandler(callback)
    Registers an onload handler.
    Parameters:
      Function callback - The handler to run

unescapeString

<static> String unescapeString(str)
    Reverses escapeString.
    Parameters:
      String str - The String to unescape.
    Returns:
      String The unescaped String.

Documentation generated by JsDoc Toolkit 1.3.3