java.lang.Object
org.htmlunit.corejs.javascript.SlotMapOwner<org.htmlunit.corejs.javascript.Scriptable>
org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.javascript.HtmlUnitScriptable
org.htmlunit.javascript.host.dom.DOMRectReadOnly
- All Implemented Interfaces:
Serializable,Cloneable,org.htmlunit.corejs.javascript.ConstProperties<org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.debug.DebuggableObject,org.htmlunit.corejs.javascript.PropHolder<org.htmlunit.corejs.javascript.Scriptable>,org.htmlunit.corejs.javascript.Scriptable,org.htmlunit.corejs.javascript.SymbolScriptable
- Direct Known Subclasses:
DOMRect
A JavaScript object for
DOMRectReadOnly.- Author:
- Ahmed Ashour, Ronald Brill
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.htmlunit.corejs.javascript.ScriptableObject
org.htmlunit.corejs.javascript.ScriptableObject.DescriptorInfo, org.htmlunit.corejs.javascript.ScriptableObject.KeyComparator, org.htmlunit.corejs.javascript.ScriptableObject.LambdaGetterFunction, org.htmlunit.corejs.javascript.ScriptableObject.LambdaSetterFunction -
Field Summary
Fields inherited from class org.htmlunit.corejs.javascript.ScriptableObject
CONST, DONTENUM, EMPTY, PERMANENT, READONLY, UNINITIALIZED_CONSTFields inherited from class org.htmlunit.corejs.javascript.SlotMapOwner
isSealedFields inherited from interface org.htmlunit.corejs.javascript.Scriptable
NOT_FOUND -
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance.DOMRectReadOnly(int x, int y, int width, int height) Creates an instance, with the given coordinates. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns thebottomcoordinate.doubleReturns theheight.doublegetLeft()Returns theleftcoordinate.doublegetRight()Returns therightcoordinate.doublegetTop()Returns thetopcoordinate.doublegetWidth()Returns thewidth.doublegetX()Returns thexcoordinate.doublegetY()Returns theycoordinate.protected voidinit(Object[] args, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Function ctorObj) static DOMRectReadOnlyjsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr) JavaScript constructor.voidsetHeight(double height) Sets theheight.voidsetWidth(double width) Sets thewidth.voidsetX(double x) Sets thexcoordinate.voidsetY(double y) Sets theycoordinate.org.htmlunit.corejs.javascript.ScriptabletoJSON()Returns a JSON representation of the DOMRectReadOnly object.Methods inherited from class org.htmlunit.javascript.HtmlUnitScriptable
clone, equivalentValues, get, getBrowserVersion, getClassName, getDefaultValue, getDomNodeOrDie, getDomNodeOrNull, getPrototype, getScriptableFor, getWindow, getWindow, getWindowOrWorkerGlobalScope, getWithPreemption, has, hasInstance, makeScriptableFor, put, setClassName, setDomNode, setDomNode, setupPromise, setupRejectedPromiseMethods inherited from class org.htmlunit.corejs.javascript.ScriptableObject
applyDescriptorToAttributeBitset, avoidObjectDetection, buildDataDescriptor, callMethod, callMethod, checkNotSealed, checkPropertyChangeForSlot, checkPropertyChangeForSlot, checkPropertyDefinition, checkPropertyDefinition, checkSlotRemoval, defineBuiltinProperty, defineBuiltinProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineBuiltInProperty, defineClass, defineClass, defineClass, defineConst, defineConstProperty, defineFunctionProperties, defineOwnProperties, defineOwnProperty, defineOwnProperty, defineOwnProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, defineProperty, delete, delete, delete, deleteProperty, deleteProperty, deleteProperty, ensureScriptable, ensureScriptableObject, ensureScriptableObjectButNotSymbol, ensureSymbolScriptable, ensureType, get, get, getAllIds, getAncestor, getArrayPrototype, getClassPrototype, getClassPrototype, getDefaultValue, getExternalArrayData, getExternalArrayLength, getFunctionPrototype, getGeneratorFunctionPrototype, getGetterOrSetter, getGetterOrSetter, getObjectPrototype, getOwnPropertyDescriptor, getParentScope, getProperty, getProperty, getProperty, getProperty, getProperty, getPropertyIds, getPrototype, getSuperProperty, getSuperProperty, getSuperProperty, getThis, getTopLevelScope, getTopScopeValue, getTypedProperty, getTypedProperty, getTypeOf, hasProperty, hasProperty, hasProperty, hasProperty, isAccessorDescriptor, isAccessorDescriptor, isConst, isDataDescriptor, isEmpty, isExtensible, isFalse, isGenericDescriptor, isGenericDescriptor, isGetterOrSetter, isGetterOrSetter, isTrue, preventExtensions, put, put, putConst, putConstProperty, putConstProperty, putOwnProperty, putOwnProperty, putOwnProperty, putProperty, putProperty, putProperty, putProperty, putSuperProperty, putSuperProperty, putSuperProperty, querySlot, redefineProperty, redefineProperty, sameValue, sealObject, setCommonDescriptorProperties, setExternalArrayData, setGetterOrSetter, setParentScope, setPrototype, sizeMethods inherited from class org.htmlunit.corejs.javascript.SlotMapOwner
associateValue, checkNotSealed, copyAssociatedValue, createSlotMap, defineProperty, defineProperty, get, getAssociatedValue, getAttributes, getAttributes, getAttributes, getAttributes, getAttributes, getIds, has, has, isSealed, readMaps, setAttributes, setAttributes, setAttributes, setAttributes, setAttributes, writeMapsMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.htmlunit.corejs.javascript.Scriptable
get, getIds, has, hasMethods inherited from interface org.htmlunit.corejs.javascript.SymbolScriptable
get, has
-
Constructor Details
-
DOMRectReadOnly
public DOMRectReadOnly()Creates an instance. -
DOMRectReadOnly
public DOMRectReadOnly(int x, int y, int width, int height) Creates an instance, with the given coordinates.- Parameters:
x- the x coordinate of the rectangle surrounding the object contenty- the y coordinate of the rectangle surrounding the object contentwidth- the width coordinate of the rectangle surrounding the object contentheight- the height of the rectangle surrounding the object content
-
-
Method Details
-
jsConstructor
public static DOMRectReadOnly jsConstructor(org.htmlunit.corejs.javascript.Context cx, org.htmlunit.corejs.javascript.VarScope scope, Object[] args, org.htmlunit.corejs.javascript.Function ctorObj, boolean inNewExpr) JavaScript constructor.- Parameters:
cx- the current contextscope- the scopeargs- the arguments to the DOMRectReadOnly constructorctorObj- the function objectinNewExpr-trueif invoked with thenewoperator- Returns:
- the Java object that JavaScript can access
-
init
protected void init(Object[] args, org.htmlunit.corejs.javascript.VarScope scope, org.htmlunit.corejs.javascript.Function ctorObj) -
getX
public double getX()Returns thexcoordinate.- Returns:
- the
xcoordinate
-
setX
public void setX(double x) Sets thexcoordinate.- Parameters:
x- the new value
-
getY
public double getY()Returns theycoordinate.- Returns:
- the
ycoordinate
-
setY
public void setY(double y) Sets theycoordinate.- Parameters:
y- the new value
-
getWidth
public double getWidth()Returns thewidth.- Returns:
- the
width
-
setWidth
public void setWidth(double width) Sets thewidth.- Parameters:
width- the new value
-
getHeight
public double getHeight()Returns theheight.- Returns:
- the
height
-
setHeight
public void setHeight(double height) Sets theheight.- Parameters:
height- the new value
-
getTop
public double getTop()Returns thetopcoordinate.- Returns:
- the
topcoordinate
-
getRight
public double getRight()Returns therightcoordinate.- Returns:
- the
rightcoordinate
-
getBottom
public double getBottom()Returns thebottomcoordinate.- Returns:
- the
bottomcoordinate
-
getLeft
public double getLeft()Returns theleftcoordinate.- Returns:
- the
leftcoordinate
-
toJSON
public org.htmlunit.corejs.javascript.Scriptable toJSON()Returns a JSON representation of the DOMRectReadOnly object.- Returns:
- a JSON representation of the DOMRectReadOnly object
-