1 | /**
|
2 | *
|
3 | */
|
4 | export declare class HtmlWriter {
|
5 | /**
|
6 | * @private
|
7 | * @type {Array}
|
8 | */
|
9 | public bufferedAttributes: any[];
|
10 |
|
11 | /**
|
12 | * @private
|
13 | * @type {Array}
|
14 | */
|
15 | public bufferedTags: string[];
|
16 |
|
17 | /**
|
18 | * and clear buffer
|
19 | */
|
20 | public buffer: string;
|
21 | /**
|
22 | * Writes an attribute to an array of attributes that is going to be used in writeBeginTag function
|
23 | * @param {String} name - The name of the HTML attribute
|
24 | * @param {String} value - The value of the HTML attribute
|
25 | * @returns {HtmlWriter}
|
26 | * @param name
|
27 | * @param value
|
28 | * @return
|
29 | */
|
30 | public writeAttribute(name: string, value: string): /* HtmlWriter.prototype.+HtmlWriter */ any;
|
31 |
|
32 | /**
|
33 | * Writes an array of attributes to the output buffer. This attributes are going to be rendered after writeBeginTag or WriteFullBeginTag function call.
|
34 | * @param {Array|Object} obj - An array of attributes or an object that represents an array of attributes
|
35 | * @returns {HtmlWriter}
|
36 | * @param obj
|
37 | * @return
|
38 | */
|
39 | public writeAttributes(obj: any[] | {}): /* !this */ any;
|
40 |
|
41 | /**
|
42 | * @param {String} tag
|
43 | * @returns {HtmlWriter}
|
44 | * @param tag
|
45 | * @return
|
46 | */
|
47 | public writeBeginTag(tag: string): /* !this */ any;
|
48 |
|
49 | /**
|
50 | * Writes a full begin HTML tag (e.g <div/>).
|
51 | * @param {String} tag
|
52 | * @returns {HtmlWriter}
|
53 | * @param tag
|
54 | * @return
|
55 | */
|
56 | public writeFullBeginTag(tag: string): /* !this */ any;
|
57 |
|
58 | /**
|
59 | * Writes an end HTML tag (e.g </div>) based on the current buffered tags.
|
60 | * @returns {HtmlWriter}
|
61 | * @return
|
62 | */
|
63 | public writeEndTag(): /* !this */ any;
|
64 |
|
65 | /**
|
66 | * @param {String} s
|
67 | * @returns {HtmlWriter}
|
68 | * @param s
|
69 | * @return
|
70 | */
|
71 | public writeText(s: string): /* !this */ any;
|
72 |
|
73 | /**
|
74 | * @param {String} s
|
75 | * @returns {HtmlWriter}
|
76 | * @param s
|
77 | * @return
|
78 | */
|
79 | public write(s: string): /* !this */ any;
|
80 |
|
81 | /**
|
82 | * @param {function} fn
|
83 | * @param fn
|
84 | */
|
85 | public writeTo(fn: any): void;
|
86 |
|
87 | }
|