dojo.AdapterRegistry.register
dojo.require("dojo.AdapterRegistry");
defined in dojo/AdapterRegistry.js
register a check function to determine if the wrap function or object gets selected
Usage
parameter | type | description |
---|---|---|
name | String | a way to identify this matcher. |
check | Function | a function that arguments are passed to from the adapter's match() function. The check function should return true if the given arguments are appropriate for the wrap function. |
wrap | Function | |
directReturn | Boolean | Optional. If directReturn is true, the value passed in for wrap will be returned instead of being called. Alternately, the AdapterRegistry can be set globally to "return not call" using the returnWrappers property. Either way, this behavior allows the registry to act as a "search" function instead of a function interception library. |
override | Boolean | Optional. If override is given and true, the check function will be given highest priority. Otherwise, it will be the lowest priority adapter. |