1 |
|
2 |
|
3 | export class Comment {
|
4 | static __wrap(ptr: any): any;
|
5 | __destroy_into_raw(): number | undefined;
|
6 | ptr: number | undefined;
|
7 | free(): void;
|
8 | |
9 |
|
10 |
|
11 |
|
12 | before(content: string, content_type: any | undefined): Comment;
|
13 | |
14 |
|
15 |
|
16 |
|
17 | after(content: string, content_type: any | undefined): Comment;
|
18 | |
19 |
|
20 |
|
21 |
|
22 | replace(content: string, content_type: any | undefined): Comment;
|
23 | |
24 |
|
25 | remove(): Comment;
|
26 | |
27 |
|
28 |
|
29 | get removed(): boolean;
|
30 | |
31 |
|
32 |
|
33 | set text(arg: string);
|
34 | |
35 |
|
36 |
|
37 | get text(): string;
|
38 | }
|
39 |
|
40 |
|
41 | export class Doctype {
|
42 | static __wrap(ptr: any): any;
|
43 | __destroy_into_raw(): number | undefined;
|
44 | ptr: number | undefined;
|
45 | free(): void;
|
46 | |
47 |
|
48 |
|
49 | get name(): any;
|
50 | |
51 |
|
52 |
|
53 | get publicId(): any;
|
54 | |
55 |
|
56 |
|
57 | get systemId(): any;
|
58 | }
|
59 |
|
60 |
|
61 | export class DocumentEnd {
|
62 | static __wrap(ptr: any): any;
|
63 | __destroy_into_raw(): number | undefined;
|
64 | ptr: number | undefined;
|
65 | free(): void;
|
66 | |
67 |
|
68 |
|
69 |
|
70 | append(content: string, content_type: any | undefined): DocumentEnd;
|
71 | }
|
72 |
|
73 |
|
74 | export class Element {
|
75 | static __wrap(ptr: any): any;
|
76 | __destroy_into_raw(): number | undefined;
|
77 | ptr: number | undefined;
|
78 | free(): void;
|
79 | |
80 |
|
81 |
|
82 |
|
83 | before(content: string, content_type: any | undefined): Element;
|
84 | |
85 |
|
86 |
|
87 |
|
88 | after(content: string, content_type: any | undefined): Element;
|
89 | |
90 |
|
91 |
|
92 |
|
93 | replace(content: string, content_type: any | undefined): Element;
|
94 | |
95 |
|
96 | remove(): Element;
|
97 | |
98 |
|
99 |
|
100 | get removed(): boolean;
|
101 | |
102 |
|
103 |
|
104 | set tagName(arg: string);
|
105 | |
106 |
|
107 |
|
108 | get tagName(): string;
|
109 | |
110 |
|
111 |
|
112 | get namespaceURI(): any;
|
113 | |
114 |
|
115 |
|
116 | get attributes(): any;
|
117 | |
118 |
|
119 |
|
120 |
|
121 | getAttribute(name: string): any;
|
122 | |
123 |
|
124 |
|
125 |
|
126 | hasAttribute(name: string): boolean;
|
127 | |
128 |
|
129 |
|
130 |
|
131 | setAttribute(name: string, value: string): Element;
|
132 | |
133 |
|
134 |
|
135 | removeAttribute(name: string): Element;
|
136 | |
137 |
|
138 |
|
139 |
|
140 | prepend(content: string, content_type: any | undefined): Element;
|
141 | |
142 |
|
143 |
|
144 |
|
145 | append(content: string, content_type: any | undefined): Element;
|
146 | |
147 |
|
148 |
|
149 |
|
150 | setInnerContent(content: string, content_type: any | undefined): Element;
|
151 | |
152 |
|
153 | removeAndKeepContent(): Element;
|
154 | |
155 |
|
156 |
|
157 | onEndTag(handler: any): void;
|
158 | }
|
159 |
|
160 |
|
161 | export class EndTag {
|
162 | static __wrap(ptr: any): any;
|
163 | __destroy_into_raw(): number | undefined;
|
164 | ptr: number | undefined;
|
165 | free(): void;
|
166 | |
167 |
|
168 |
|
169 | set name(arg: string);
|
170 | |
171 |
|
172 |
|
173 | get name(): string;
|
174 | |
175 |
|
176 |
|
177 |
|
178 | before(content: string, content_type: any | undefined): EndTag;
|
179 | |
180 |
|
181 |
|
182 |
|
183 | after(content: string, content_type: any | undefined): EndTag;
|
184 | |
185 |
|
186 | remove(): EndTag;
|
187 | }
|
188 |
|
189 |
|
190 | export class HTMLRewriter {
|
191 | static __wrap(ptr: any): any;
|
192 | |
193 |
|
194 |
|
195 |
|
196 | constructor(output_sink: any, options: any | undefined);
|
197 | __destroy_into_raw(): number | undefined;
|
198 | ptr: number | undefined;
|
199 | free(): void;
|
200 | /**
|
201 | * @param {string} selector
|
202 | * @param {any} handlers
|
203 | */
|
204 | on(selector: string, handlers: any): HTMLRewriter;
|
205 | |
206 |
|
207 |
|
208 | onDocument(handlers: any): HTMLRewriter;
|
209 | |
210 |
|
211 |
|
212 | write(chunk: Uint8Array): Promise<void>;
|
213 | |
214 |
|
215 | end(): Promise<void>;
|
216 | |
217 |
|
218 |
|
219 | get asyncifyStackPtr(): number;
|
220 | }
|
221 |
|
222 |
|
223 | export class TextChunk {
|
224 | static __wrap(ptr: any): any;
|
225 | __destroy_into_raw(): number | undefined;
|
226 | ptr: number | undefined;
|
227 | free(): void;
|
228 | |
229 |
|
230 |
|
231 |
|
232 | before(content: string, content_type: any | undefined): TextChunk;
|
233 | |
234 |
|
235 |
|
236 |
|
237 | after(content: string, content_type: any | undefined): TextChunk;
|
238 | |
239 |
|
240 |
|
241 |
|
242 | replace(content: string, content_type: any | undefined): TextChunk;
|
243 | |
244 |
|
245 | remove(): TextChunk;
|
246 | |
247 |
|
248 |
|
249 | get removed(): boolean;
|
250 | |
251 |
|
252 |
|
253 | get text(): string;
|
254 | |
255 |
|
256 |
|
257 | get lastInTextNode(): boolean;
|
258 | }
|
259 | export default init;
|
260 | declare function init(input: any): Promise<WebAssembly.Exports>;
|