public object Call(IEnumerable <object> arguments)
        {
            var result = UnderlyingJSValue.Call(
                arguments.Select(Context.ToJSValue).ToArray()
                );

            JSException.ThrowIfSet(Context.UnderlyingJSContext);

            return(Context.FromJSValue(result));
        }
        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));
        }
        public override bool Equals(object obj)
        {
            var wrapped = obj as WrappedObject;

            return(wrapped != null && UnderlyingJSValue.Equals(wrapped.UnderlyingJSValue));
        }
Exemple #4
0
 public void ScrollIntoView(bool alignToTop = true)
 {
     UnderlyingJSValue.Invoke("scrollIntoView", JSValue.From(alignToTop, UnderlyingJSValue.Context));
 }
Exemple #5
0
 public void RemoveAttribute(string name)
 {
     UnderlyingJSValue.Invoke("removeAttribute", JSValue.From(name, UnderlyingJSValue.Context));
 }
Exemple #6
0
 public bool HasAttribute(string name)
 {
     return(UnderlyingJSValue.Invoke("hasAttribute", JSValue.From(name, UnderlyingJSValue.Context)).ToBool());
 }
Exemple #7
0
 public void Normalize()
 {
     UnderlyingJSValue.Invoke("normalize");
 }
 public void DeleteRule(int index)
 {
     UnderlyingJSValue.Invoke("deleteRule", JSValue.From(index, UnderlyingJSValue.Context));
 }
Exemple #9
0
 public DocumentPosition CompareDocumentPosition(Node other)
 {
     return((DocumentPosition)UnderlyingJSValue.Invoke("compareDocumentPosition", JSValue.From(other.UnderlyingJSValue, UnderlyingJSValue.Context)).ToUInt32());
 }
Exemple #10
0
 public bool HasProperty(string property)
 {
     return(UnderlyingJSValue.HasProperty(property));
 }
Exemple #11
0
 public void SetProperty(string property, object value)
 {
     UnderlyingJSValue.SetProperty(Context.ToJSValue(value), property);
 }
Exemple #12
0
 public object GetProperty(string property)
 {
     return(Context.FromJSValue(UnderlyingJSValue.GetProperty(property)));
 }
Exemple #13
0
 public object GetValueAt(int index)
 {
     return(Context.FromJSValue(UnderlyingJSValue.GetValueAt((nuint)index)));
 }
Exemple #14
0
 public string [] GetPropertyNames()
 {
     return(UnderlyingJSValue.GetPropertyNames());
 }
Exemple #15
0
 public override int GetHashCode()
 {
     return(UnderlyingJSValue.GetHashCode());
 }
Exemple #16
0
 public Node AppendChild(Node child)
 {
     return(Wrap <Node> (UnderlyingJSValue.Invoke("appendChild", JSValue.From(child.UnderlyingJSValue, UnderlyingJSValue.Context))));
 }
Exemple #17
0
 public Node CloneNode(bool deep)
 {
     return(Wrap <Node> (UnderlyingJSValue.Invoke("cloneNode", JSValue.From(deep, UnderlyingJSValue.Context))));
 }
Exemple #18
0
 public void PreventDefault()
 {
     UnderlyingJSValue.Invoke("preventDefault");
 }
Exemple #19
0
 public void InsertRule(string rule, int index)
 {
     UnderlyingJSValue.Invoke("insertRule", JSValue.From(rule, UnderlyingJSValue.Context), JSValue.From(index, UnderlyingJSValue.Context));
 }
Exemple #20
0
 public void StopPropagation()
 {
     UnderlyingJSValue.Invoke("stopPropagation");
 }
Exemple #21
0
 public bool Contains(Element other)
 {
     return(UnderlyingJSValue.Invoke("contains", JSValue.From(other.UnderlyingJSValue, UnderlyingJSValue.Context)).ToBool());
 }
Exemple #22
0
 public bool HasChildNodes()
 {
     return(UnderlyingJSValue.Invoke("hasChildNodes").ToBool());
 }
Exemple #23
0
 public void SetAttribute(string name, string value)
 {
     UnderlyingJSValue.Invoke("setAttribute", JSValue.From(name, UnderlyingJSValue.Context), JSValue.From(value, UnderlyingJSValue.Context));
 }
Exemple #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))));
 }
Exemple #25
0
 public string GetAttribute(string name)
 {
     return(UnderlyingJSValue.Invoke("getAttribute", JSValue.From(name, UnderlyingJSValue.Context)).ToNullableString());
 }
Exemple #26
0
 public bool IsEqualNode(Node other)
 {
     return(UnderlyingJSValue.Invoke("isEqualNode", JSValue.From(other.UnderlyingJSValue, UnderlyingJSValue.Context)).ToBool());
 }
Exemple #27
0
 public ClientRect GetBoundingClientRect()
 {
     return(Wrap <ClientRect> (UnderlyingJSValue.Invoke("getBoundingClientRect")));
 }
Exemple #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))));
 }
Exemple #29
0
 public void ScrollIntoView(ScrollIntoViewOptions options)
 {
     UnderlyingJSValue.Invoke("scrollIntoView", JSValue.From(options, UnderlyingJSValue.Context));
 }
Exemple #30
0
 public void Click()
 {
     UnderlyingJSValue.Invoke("click");
 }