Exemplo n.º 1
0
        private static Element Call(bool register, string name, params object[] arguments)
        {
            if (register)
            {
                DomHelper.RegisterScript(name, arguments);
                return(null);
            }

            return(DomHelper.ReturnElement(name, arguments));
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates new DOM element(s) and overwrites the contents of el with them.
 /// </summary>
 /// <param name="el">The context element</param>
 /// <param name="o">The DOM object spec (and children)</param>
 public static Element Overwrite(Element el, string o)
 {
     return(DomHelper.Call(false, "overwrite", new JRawValue(el.Descriptor), o, true));
 }
Exemplo n.º 3
0
 /// <summary>
 /// Creates new DOM element(s) and overwrites the contents of el with them.
 /// </summary>
 /// <param name="el">The context element</param>
 /// <param name="o">The DOM object spec (and children)</param>
 public static Element Overwrite(Element el, DomObject o)
 {
     return(DomHelper.Call(false, "overwrite", new JRawValue(el.Descriptor), new JRawValue(o.Serialize()), true));
 }
Exemplo n.º 4
0
 /// <summary>
 /// Creates new DOM element(s) and inserts them as the first child of el.
 /// </summary>
 /// <param name="el">The context element</param>
 /// <param name="o">The DOM object spec (and children)</param>
 public static Element InsertFirst(Element el, string o)
 {
     return(DomHelper.Call(false, "insertFirst", new JRawValue(el.Descriptor), o, true));
 }
Exemplo n.º 5
0
 /// <summary>
 /// Creates new DOM element(s) and inserts them as the first child of el.
 /// </summary>
 /// <param name="el">The context element</param>
 /// <param name="o">The DOM object spec (and children)</param>
 public static Element InsertFirst(Element el, DomObject o)
 {
     return(DomHelper.Call(false, "insertFirst", new JRawValue(el.Descriptor), new JRawValue(o.Serialize()), true));
 }
Exemplo n.º 6
0
 /// <summary>
 /// Applies a style specification to an element.
 /// </summary>
 /// <param name="el">The element to apply styles to</param>
 /// <param name="styles">A style specification.</param>
 public static void ApplyStyles(Element el, Dictionary <string, string> styles)
 {
     DomHelper.Call(true, "applyStyles", new JRawValue(el.Descriptor), styles);
 }
Exemplo n.º 7
0
 /// <summary>
 /// Creates new DOM element(s) and appends them to el.
 /// </summary>
 /// <param name="el">The context element</param>
 /// <param name="o">Raw HTML blob</param>
 public static Element Append(Element el, string o)
 {
     return(DomHelper.Call(false, "append", new JRawValue(el.Descriptor), o, true));
 }
Exemplo n.º 8
0
 /// <summary>
 /// Creates new DOM element(s) and appends them to el.
 /// </summary>
 /// <param name="el">The context element</param>
 /// <param name="o">The DOM object spec (and children) or raw HTML blob</param>
 public static Element Append(Element el, DomObject o)
 {
     return(DomHelper.Call(false, "append", new JRawValue(el.Descriptor), new JRawValue(new ClientConfig().Serialize(o)), true));
 }