js.web.dom.XPathResult Maven / Gradle / Ivy
package js.web.dom;
import js.extras.JsEnum;
import js.lang.Any;
import org.teavm.jso.JSBody;
import org.teavm.jso.JSProperty;
import javax.annotation.Nullable;
/**
* The results generated by evaluating an XPath expression within the context of a given node.
*/
public interface XPathResult extends Any {
@JSBody(script = "return XPathResult.prototype")
static XPathResult prototype() {
throw new UnsupportedOperationException("Available only in JavaScript");
}
@JSBody(script = "return new XPathResult()")
static XPathResult create() {
throw new UnsupportedOperationException("Available only in JavaScript");
}
@JSProperty
boolean isBooleanValue();
@JSProperty
boolean isInvalidIteratorState();
@JSProperty
double getNumberValue();
@JSProperty
ResultType getResultType();
@JSProperty
@Nullable
Node getSingleNodeValue();
@JSProperty
double getSnapshotLength();
@JSProperty
String getStringValue();
@Nullable
Node iterateNext();
@Nullable
Node snapshotItem(int index);
abstract class ResultType extends JsEnum {
public static final ResultType ANY_TYPE = JsEnum.from("XPathResult.ANY_TYPE");
public static final ResultType ANY_UNORDERED_NODE_TYPE = JsEnum.from("XPathResult.ANY_UNORDERED_NODE_TYPE");
public static final ResultType BOOLEAN_TYPE = JsEnum.from("XPathResult.BOOLEAN_TYPE");
public static final ResultType FIRST_ORDERED_NODE_TYPE = JsEnum.from("XPathResult.FIRST_ORDERED_NODE_TYPE");
public static final ResultType NUMBER_TYPE = JsEnum.from("XPathResult.NUMBER_TYPE");
public static final ResultType ORDERED_NODE_ITERATOR_TYPE = JsEnum.from("XPathResult.ORDERED_NODE_ITERATOR_TYPE");
public static final ResultType ORDERED_NODE_SNAPSHOT_TYPE = JsEnum.from("XPathResult.ORDERED_NODE_SNAPSHOT_TYPE");
public static final ResultType STRING_TYPE = JsEnum.from("XPathResult.STRING_TYPE");
public static final ResultType UNORDERED_NODE_ITERATOR_TYPE = JsEnum.from("XPathResult.UNORDERED_NODE_ITERATOR_TYPE");
public static final ResultType UNORDERED_NODE_SNAPSHOT_TYPE = JsEnum.from("XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE");
}
}