Beispiel #1
0
        public object Invoke(string method, IEnumerable <object> arguments)
        {
            var result = UnderlyingJSValue.Invoke(
                method,
                arguments.Select(Context.ToJSValue).ToArray()
                );

            JSException.ThrowIfSet(Context.UnderlyingJSContext);

            return(Context.FromJSValue(result));
        }
Beispiel #2
0
 public void SetEndAfter(Node referenceNode)
 {
     UnderlyingJSValue.Invoke("setEndAfter", JSValue.From(referenceNode.UnderlyingJSValue, UnderlyingJSValue.Context));
 }
Beispiel #3
0
 public void ScrollIntoView(bool alignToTop = true)
 {
     UnderlyingJSValue.Invoke("scrollIntoView", JSValue.From(alignToTop, UnderlyingJSValue.Context));
 }
Beispiel #4
0
 public void RemoveAttribute(string name)
 {
     UnderlyingJSValue.Invoke("removeAttribute", JSValue.From(name, UnderlyingJSValue.Context));
 }
Beispiel #5
0
 public bool HasAttribute(string name)
 {
     return(UnderlyingJSValue.Invoke("hasAttribute", JSValue.From(name, UnderlyingJSValue.Context)).ToBool());
 }
Beispiel #6
0
 public void Normalize()
 {
     UnderlyingJSValue.Invoke("normalize");
 }
Beispiel #7
0
 public void DeleteRule(int index)
 {
     UnderlyingJSValue.Invoke("deleteRule", JSValue.From(index, UnderlyingJSValue.Context));
 }
Beispiel #8
0
 public DocumentPosition CompareDocumentPosition(Node other)
 {
     return((DocumentPosition)UnderlyingJSValue.Invoke("compareDocumentPosition", JSValue.From(other.UnderlyingJSValue, UnderlyingJSValue.Context)).ToUInt32());
 }
Beispiel #9
0
 public void Click()
 {
     UnderlyingJSValue.Invoke("click");
 }
Beispiel #10
0
 public void Blur()
 {
     UnderlyingJSValue.Invoke("blur");
 }
Beispiel #11
0
 public void Focus()
 {
     UnderlyingJSValue.Invoke("focus");
 }
Beispiel #12
0
 public CssStyleSheet this [int index] {
     get {
         return(Wrap <CssStyleSheet> (UnderlyingJSValue.Invoke("item", JSValue.From(index, UnderlyingJSValue.Context))));
     }
 }
Beispiel #13
0
 public void SelectNode(Node referenceNode)
 {
     UnderlyingJSValue.Invoke("selectNode", JSValue.From(referenceNode.UnderlyingJSValue, UnderlyingJSValue.Context));
 }
Beispiel #14
0
 public void DeleteContents()
 {
     UnderlyingJSValue.Invoke("deleteContents");
 }
Beispiel #15
0
 public void Collapse(bool toStart = false)
 {
     UnderlyingJSValue.Invoke("collapse", JSValue.From(toStart, UnderlyingJSValue.Context));
 }
Beispiel #16
0
 public Node AppendChild(Node child)
 {
     return(Wrap <Node> (UnderlyingJSValue.Invoke("appendChild", JSValue.From(child.UnderlyingJSValue, UnderlyingJSValue.Context))));
 }
Beispiel #17
0
 public Node CloneNode(bool deep)
 {
     return(Wrap <Node> (UnderlyingJSValue.Invoke("cloneNode", JSValue.From(deep, UnderlyingJSValue.Context))));
 }
Beispiel #18
0
 public void PreventDefault()
 {
     UnderlyingJSValue.Invoke("preventDefault");
 }
Beispiel #19
0
 public void InsertRule(string rule, int index)
 {
     UnderlyingJSValue.Invoke("insertRule", JSValue.From(rule, UnderlyingJSValue.Context), JSValue.From(index, UnderlyingJSValue.Context));
 }
Beispiel #20
0
 public void StopPropagation()
 {
     UnderlyingJSValue.Invoke("stopPropagation");
 }
Beispiel #21
0
 public bool Contains(Element other)
 {
     return(UnderlyingJSValue.Invoke("contains", JSValue.From(other.UnderlyingJSValue, UnderlyingJSValue.Context)).ToBool());
 }
Beispiel #22
0
 public bool HasChildNodes()
 {
     return(UnderlyingJSValue.Invoke("hasChildNodes").ToBool());
 }
Beispiel #23
0
 public void SetAttribute(string name, string value)
 {
     UnderlyingJSValue.Invoke("setAttribute", JSValue.From(name, UnderlyingJSValue.Context), JSValue.From(value, UnderlyingJSValue.Context));
 }
Beispiel #24
0
 public Node InsertBefore(Node newNode, Node referenceNode)
 {
     return(Wrap <Node> (UnderlyingJSValue.Invoke("insertBefore", JSValue.From(newNode.UnderlyingJSValue, UnderlyingJSValue.Context), JSValue.From(referenceNode.UnderlyingJSValue, UnderlyingJSValue.Context))));
 }
Beispiel #25
0
 public string GetAttribute(string name)
 {
     return(UnderlyingJSValue.Invoke("getAttribute", JSValue.From(name, UnderlyingJSValue.Context)).ToNullableString());
 }
Beispiel #26
0
 public bool IsEqualNode(Node other)
 {
     return(UnderlyingJSValue.Invoke("isEqualNode", JSValue.From(other.UnderlyingJSValue, UnderlyingJSValue.Context)).ToBool());
 }
Beispiel #27
0
 public ClientRect GetBoundingClientRect()
 {
     return(Wrap <ClientRect> (UnderlyingJSValue.Invoke("getBoundingClientRect")));
 }
Beispiel #28
0
 public Node ReplaceChild(Node newChild, Node oldChild)
 {
     return(Wrap <Node> (UnderlyingJSValue.Invoke("replaceChild", JSValue.From(newChild.UnderlyingJSValue, UnderlyingJSValue.Context), JSValue.From(oldChild.UnderlyingJSValue, UnderlyingJSValue.Context))));
 }
Beispiel #29
0
 public void ScrollIntoView(ScrollIntoViewOptions options)
 {
     UnderlyingJSValue.Invoke("scrollIntoView", JSValue.From(options, UnderlyingJSValue.Context));
 }
Beispiel #30
0
 public void SetStartBefore(Node referenceNode)
 {
     UnderlyingJSValue.Invoke("setStartBefore", JSValue.From(referenceNode.UnderlyingJSValue, UnderlyingJSValue.Context));
 }