com.gargoylesoftware.htmlunit.javascript.host.css
Class StyleSheetList

java.lang.Object
  extended by net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
      extended by com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
          extended by com.gargoylesoftware.htmlunit.javascript.host.css.StyleSheetList
All Implemented Interfaces:
Serializable, Cloneable, Map, net.sourceforge.htmlunit.corejs.javascript.ConstProperties, net.sourceforge.htmlunit.corejs.javascript.debug.DebuggableObject, net.sourceforge.htmlunit.corejs.javascript.Scriptable

public class StyleSheetList
extends SimpleScriptable

An ordered list of stylesheets, accessible via document.styleSheets, as specified by the DOM Level 2 Style spec and the Gecko DOM Guide.

If CSS is disabled via WebClient.setCssEnabled(boolean), instances of this class will always be empty. This allows us to check for CSS enablement/disablement in a single location, without having to sprinkle checks throughout the code.

Version:
$Revision: 5619 $
Author:
Daniel Gredler, Ahmed Ashour
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Field Summary
 
Fields inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONST
 
Fields inherited from interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
NOT_FOUND
 
Constructor Summary
StyleSheetList()
          Rhino requires default constructors.
StyleSheetList(HTMLDocument document)
          Creates a new style sheet list owned by the specified document.
 
Method Summary
 Object get(int index, net.sourceforge.htmlunit.corejs.javascript.Scriptable start)
          
 Object jsxFunction_item(int index)
          Returns the style sheet at the specified index.
 int jsxGet_length()
          Returns the list's length.
 
Methods inherited from class com.gargoylesoftware.htmlunit.javascript.SimpleScriptable
clone, defineFunctionProperties, defineProperty, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getStartingScope, getTransformerScriptableFor, getWindow, getWindow, getWithPreemption, hasInstance, initParentScope, makeScriptableFor, setCaseSensitive, setDomNode, setDomNode, setHtmlElement
 
Methods inherited from class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, associateValue, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, clear, containsKey, containsValue, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineOwnProperties, defineOwnProperty, defineProperty, defineProperty, defineProperty, delete, delete, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, entrySet, get, getAllIds, getArrayPrototype, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getClassPrototype, getDefaultValue, getFunctionPrototype, getGetterOrSetter, getIds, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getPropertyIds, getPrototype, getSlot, getTopLevelScope, getTopScopeValue, getTypeOf, has, has, hasProperty, hasProperty, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGetterOrSetter, isSealed, isTrue, keySet, preventExtensions, put, put, put, putAll, putConst, putConstProperty, putProperty, putProperty, redefineProperty, remove, sealObject, setAttributes, setAttributes, setAttributes, setAttributes, setGetterOrSetter, setParentScope, setPrototype, size, values
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Constructor Detail

StyleSheetList

public StyleSheetList()
Rhino requires default constructors.


StyleSheetList

public StyleSheetList(HTMLDocument document)
Creates a new style sheet list owned by the specified document.

Parameters:
document - the owning document
Method Detail

jsxGet_length

public int jsxGet_length()
Returns the list's length.

Returns:
the list's length

jsxFunction_item

public Object jsxFunction_item(int index)
Returns the style sheet at the specified index.

Parameters:
index - the index of the style sheet to return
Returns:
the style sheet at the specified index

get

public Object get(int index,
                  net.sourceforge.htmlunit.corejs.javascript.Scriptable start)

Specified by:
get in interface net.sourceforge.htmlunit.corejs.javascript.Scriptable
Overrides:
get in class net.sourceforge.htmlunit.corejs.javascript.ScriptableObject


Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.