JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit.javascript.host.dom

Class AbstractRange

    • Constructor Detail

      • AbstractRange

        public AbstractRange()
        Creates an instance.
      • AbstractRange

        protected AbstractRange(Node startContainer,
         Node endContainer,
         int startOffset,
         int endOffset)
        Creates a new instance.
        Parameters:
        startContainer - the start node
        endContainer - the end node
        startOffset - the start offset
        endOffset - the end offset
    • Method Detail

      • jsConstructor

        public void jsConstructor()
        Creates an instance.
      • internGetStartContainer

        protected Node internGetStartContainer()
        Returns:
        the start container
      • internSetStartContainer

        protected void internSetStartContainer(Node startContainer)
        Sets the start container.
        Parameters:
        startContainer - the new start container
      • internGetEndContainer

        protected Node internGetEndContainer()
        Returns:
        the end container
      • internSetEndContainer

        protected void internSetEndContainer(Node endContainer)
        Sets the end container.
        Parameters:
        endContainer - the new end container
      • internGetStartOffset

        protected int internGetStartOffset()
        Returns:
        the start offset
      • internSetStartOffset

        protected void internSetStartOffset(int startOffset)
        Sets the start offset.
        Parameters:
        startOffset - the new start offset
      • internGetEndOffset

        protected int internGetEndOffset()
        Returns:
        the end offset
      • internSetEndOffset

        protected void internSetEndOffset(int endOffset)
        Sets the end offset.
        Parameters:
        endOffset - the new end offset
      • getDefaultValue

        public Object getDefaultValue(Class<?> hint)
        Returns the JavaScript default value of this object. This is the JavaScript equivalent of a toString() in Java.
        Specified by:
        getDefaultValue in interface org.htmlunit.corejs.javascript.Scriptable
        Overrides:
        getDefaultValue in class HtmlUnitScriptable
        Parameters:
        hint - a hint as to the format of the default value (ignored in this case)
        Returns:
        the default value
      • getStartContainer

        public Object getStartContainer()
        Gets the node within which the Range begins.
        Returns:
        undefined if not initialized
      • getEndContainer

        public Object getEndContainer()
        Gets the node within which the Range ends.
        Returns:
        undefined if not initialized
      • getStartOffset

        public int getStartOffset()
        Gets the offset within the starting node of the Range.
        Returns:
        0 if not initialized
      • getEndOffset

        public int getEndOffset()
        Gets the offset within the end node of the Range.
        Returns:
        0 if not initialized
      • isCollapsed

        public boolean isCollapsed()
        Indicates if the range is collapsed.
        Returns:
        true if the range is collapsed
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /