com.gargoylesoftware.htmlunit.javascript
Interface ScriptableWithFallbackGetter

All Superinterfaces:
org.mozilla.javascript.Scriptable
All Known Implementing Classes:
Anchor, Button, FocusableHostElement, FormField, FrameSet, HTMLElement, HTMLFormElement, HTMLFrameElement, HTMLInputElement, HTMLOptionsCollection, HTMLSelectElement, HTMLTextAreaElement, Image, Option, RowContainer, Script, Table, TableBody, TableCell, TableFooter, TableHeader, TableRow, Window

public interface ScriptableWithFallbackGetter
extends org.mozilla.javascript.Scriptable

Provides a clean way to specify a fallback property getter when the "normal way" failed. Most properties are "cleanly" defined but some host objects like Document or Window are able to return a value that has not been configured has property (ex: the DOM node which id or name match the property name.

Version:
$Revision: 1.3 $
Author:
Marc Guillemot

Field Summary
 
Fields inherited from interface org.mozilla.javascript.Scriptable
NOT_FOUND
 
Method Summary
 java.lang.Object getWithFallback(java.lang.String name)
 Fallback called when no configured property is found with the given name on the Scriptable object.
 
Methods inherited from interface org.mozilla.javascript.Scriptable
delete, delete, get, get, getClassName, getDefaultValue, getIds, getParentScope, getPrototype, has, has, hasInstance, put, put, setParentScope, setPrototype
 

Method Detail

getWithFallback

java.lang.Object getWithFallback(java.lang.String name)
Fallback called when no configured property is found with the given name on the Scriptable object.

Parameters:
name - the name of the requested property
Returns:
the object value, Scriptable.NOT_FOUND if nothing is found


Copyright © 2003-2016 AppPerfect Corporation. All Rights Reserved.