1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
#[allow(unused_imports)]
use crate::*;
extern "C" {
    fn element_get_namespace_uri(instance: DOMReference) -> CString;
    fn element_set_namespace_uri(instance: DOMReference, value: CString);
}

pub fn get_namespace_uri(instance: DOMReference) -> String {
    unsafe { to_string(element_get_namespace_uri(instance)) }
}

pub fn set_namespace_uri(instance: DOMReference, value: &str) {
    unsafe {
        element_set_namespace_uri(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_get_prefix(instance: DOMReference) -> CString;
    fn element_set_prefix(instance: DOMReference, value: CString);
}

pub fn get_prefix(instance: DOMReference) -> String {
    unsafe { to_string(element_get_prefix(instance)) }
}

pub fn set_prefix(instance: DOMReference, value: &str) {
    unsafe {
        element_set_prefix(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_get_local_name(instance: DOMReference) -> CString;
    fn element_set_local_name(instance: DOMReference, value: CString);
}

pub fn get_local_name(instance: DOMReference) -> String {
    unsafe { to_string(element_get_local_name(instance)) }
}

pub fn set_local_name(instance: DOMReference, value: &str) {
    unsafe {
        element_set_local_name(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_get_tag_name(instance: DOMReference) -> CString;
    fn element_set_tag_name(instance: DOMReference, value: CString);
}

pub fn get_tag_name(instance: DOMReference) -> String {
    unsafe { to_string(element_get_tag_name(instance)) }
}

pub fn set_tag_name(instance: DOMReference, value: &str) {
    unsafe {
        element_set_tag_name(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_get_id(instance: DOMReference) -> CString;
    fn element_set_id(instance: DOMReference, value: CString);
}

pub fn get_id(instance: DOMReference) -> String {
    unsafe { to_string(element_get_id(instance)) }
}

pub fn set_id(instance: DOMReference, value: &str) {
    unsafe {
        element_set_id(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_get_class_name(instance: DOMReference) -> CString;
    fn element_set_class_name(instance: DOMReference, value: CString);
}

pub fn get_class_name(instance: DOMReference) -> String {
    unsafe { to_string(element_get_class_name(instance)) }
}

pub fn set_class_name(instance: DOMReference, value: &str) {
    unsafe {
        element_set_class_name(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_get_class_list(instance: DOMReference) -> i32;
    fn element_set_class_list(instance: DOMReference, value: i32);
}

pub fn get_class_list(instance: DOMReference) -> i32 {
    unsafe { element_get_class_list(instance) }
}

pub fn set_class_list(instance: DOMReference, value: i32) {
    unsafe {
        element_set_class_list(instance, value);
    }
}
extern "C" {
    fn element_get_attributes(instance: DOMReference) -> i32;
    fn element_set_attributes(instance: DOMReference, value: i32);
}

pub fn get_attributes(instance: DOMReference) -> i32 {
    unsafe { element_get_attributes(instance) }
}

pub fn set_attributes(instance: DOMReference, value: i32) {
    unsafe {
        element_set_attributes(instance, value);
    }
}
extern "C" {
    fn element_get_attribute_names(instance: i32) -> i32;
}

pub fn get_attribute_names(instance: i32) -> i32 {
    unsafe { element_get_attribute_names(instance) }
}
extern "C" {
    fn element_get_attribute(instance: i32, name: CString) -> CString;
}

pub fn get_attribute(instance: i32, name: &str) -> String {
    unsafe { to_string(element_get_attribute(instance, to_cstring(name))) }
}
extern "C" {
    fn element_get_attribute_n_s(instance: i32, namespace: CString, local_name: CString)
        -> CString;
}

pub fn get_attribute_n_s(instance: i32, namespace: &str, local_name: &str) -> String {
    unsafe {
        to_string(element_get_attribute_n_s(
            instance,
            to_cstring(namespace),
            to_cstring(local_name),
        ))
    }
}
extern "C" {
    fn element_toggle_attribute(instance: i32, name: CString, force: i32) -> i32;
}

pub fn toggle_attribute(instance: i32, name: &str, force: i32) -> i32 {
    unsafe { element_toggle_attribute(instance, to_cstring(name), force) }
}
extern "C" {
    fn element_set_attribute(instance: i32, name: CString, value: CString);
}

pub fn set_attribute(instance: i32, name: &str, value: &str) {
    unsafe { element_set_attribute(instance, to_cstring(name), to_cstring(value)) }
}
extern "C" {
    fn element_set_attribute_n_s(instance: i32, namespace: CString, name: CString, value: CString);
}

pub fn set_attribute_n_s(instance: i32, namespace: &str, name: &str, value: &str) {
    unsafe {
        element_set_attribute_n_s(
            instance,
            to_cstring(namespace),
            to_cstring(name),
            to_cstring(value),
        )
    }
}
extern "C" {
    fn element_remove_attribute(instance: i32, name: CString);
}

pub fn remove_attribute(instance: i32, name: &str) {
    unsafe { element_remove_attribute(instance, to_cstring(name)) }
}
extern "C" {
    fn element_remove_attribute_n_s(instance: i32, namespace: CString, local_name: CString);
}

pub fn remove_attribute_n_s(instance: i32, namespace: &str, local_name: &str) {
    unsafe { element_remove_attribute_n_s(instance, to_cstring(namespace), to_cstring(local_name)) }
}
extern "C" {
    fn element_has_attribute(instance: i32, name: CString) -> i32;
}

pub fn has_attribute(instance: i32, name: &str) -> i32 {
    unsafe { element_has_attribute(instance, to_cstring(name)) }
}
extern "C" {
    fn element_has_attribute_n_s(instance: i32, namespace: CString, local_name: CString) -> i32;
}

pub fn has_attribute_n_s(instance: i32, namespace: &str, local_name: &str) -> i32 {
    unsafe { element_has_attribute_n_s(instance, to_cstring(namespace), to_cstring(local_name)) }
}
extern "C" {
    fn element_has_attributes(instance: i32) -> i32;
}

pub fn has_attributes(instance: i32) -> i32 {
    unsafe { element_has_attributes(instance) }
}
extern "C" {
    fn element_closest(instance: i32, selector: CString) -> i32;
}

pub fn closest(instance: i32, selector: &str) -> i32 {
    unsafe { element_closest(instance, to_cstring(selector)) }
}
extern "C" {
    fn element_matches(instance: i32, selector: CString) -> i32;
}

pub fn matches(instance: i32, selector: &str) -> i32 {
    unsafe { element_matches(instance, to_cstring(selector)) }
}
extern "C" {
    fn element_webkit_matches_selector(instance: i32, selector: CString) -> i32;
}

pub fn webkit_matches_selector(instance: i32, selector: &str) -> i32 {
    unsafe { element_webkit_matches_selector(instance, to_cstring(selector)) }
}
extern "C" {
    fn element_get_elements_with_grid(instance: i32) -> i32;
}

pub fn get_elements_with_grid(instance: i32) -> i32 {
    unsafe { element_get_elements_with_grid(instance) }
}
extern "C" {
    fn element_insert_adjacent_element(instance: i32, location: CString, element: i32) -> i32;
}

pub fn insert_adjacent_element(instance: i32, location: &str, element: i32) -> i32 {
    unsafe { element_insert_adjacent_element(instance, to_cstring(location), element) }
}
extern "C" {
    fn element_insert_adjacent_text(instance: i32, location: CString, data: CString);
}

pub fn insert_adjacent_text(instance: i32, location: &str, data: &str) {
    unsafe { element_insert_adjacent_text(instance, to_cstring(location), to_cstring(data)) }
}
extern "C" {
    fn element_get_font_size_inflation(instance: DOMReference) -> i32;
    fn element_set_font_size_inflation(instance: DOMReference, value: i32);
}

pub fn get_font_size_inflation(instance: DOMReference) -> i32 {
    unsafe { element_get_font_size_inflation(instance) }
}

pub fn set_font_size_inflation(instance: DOMReference, value: i32) {
    unsafe {
        element_set_font_size_inflation(instance, value);
    }
}
extern "C" {
    fn element_set_pointer_capture(instance: i32, pointer_id: i32);
}

pub fn set_pointer_capture(instance: i32, pointer_id: i32) {
    unsafe { element_set_pointer_capture(instance, pointer_id) }
}
extern "C" {
    fn element_release_pointer_capture(instance: i32, pointer_id: i32);
}

pub fn release_pointer_capture(instance: i32, pointer_id: i32) {
    unsafe { element_release_pointer_capture(instance, pointer_id) }
}
extern "C" {
    fn element_has_pointer_capture(instance: i32, pointer_id: i32) -> i32;
}

pub fn has_pointer_capture(instance: i32, pointer_id: i32) -> i32 {
    unsafe { element_has_pointer_capture(instance, pointer_id) }
}
extern "C" {
    fn element_set_capture(instance: i32, retarget_to_element: i32);
}

pub fn set_capture(instance: i32, retarget_to_element: i32) {
    unsafe { element_set_capture(instance, retarget_to_element) }
}
extern "C" {
    fn element_release_capture(instance: i32);
}

pub fn release_capture(instance: i32) {
    unsafe { element_release_capture(instance) }
}
extern "C" {
    fn element_set_capture_always(instance: i32, retarget_to_element: i32);
}

pub fn set_capture_always(instance: i32, retarget_to_element: i32) {
    unsafe { element_set_capture_always(instance, retarget_to_element) }
}
extern "C" {
    fn element_get_attribute_node(instance: i32, name: CString) -> i32;
}

pub fn get_attribute_node(instance: i32, name: &str) -> i32 {
    unsafe { element_get_attribute_node(instance, to_cstring(name)) }
}
extern "C" {
    fn element_set_attribute_node(instance: i32, new_attr: i32) -> i32;
}

pub fn set_attribute_node(instance: i32, new_attr: i32) -> i32 {
    unsafe { element_set_attribute_node(instance, new_attr) }
}
extern "C" {
    fn element_remove_attribute_node(instance: i32, old_attr: i32) -> i32;
}

pub fn remove_attribute_node(instance: i32, old_attr: i32) -> i32 {
    unsafe { element_remove_attribute_node(instance, old_attr) }
}
extern "C" {
    fn element_get_attribute_node_n_s(
        instance: i32,
        namespace_uri: CString,
        local_name: CString,
    ) -> i32;
}

pub fn get_attribute_node_n_s(instance: i32, namespace_uri: &str, local_name: &str) -> i32 {
    unsafe {
        element_get_attribute_node_n_s(instance, to_cstring(namespace_uri), to_cstring(local_name))
    }
}
extern "C" {
    fn element_set_attribute_node_n_s(instance: i32, new_attr: i32) -> i32;
}

pub fn set_attribute_node_n_s(instance: i32, new_attr: i32) -> i32 {
    unsafe { element_set_attribute_node_n_s(instance, new_attr) }
}
extern "C" {
    fn element_scroll_by_no_flush(instance: i32, dx: i32, dy: i32) -> i32;
}

pub fn scroll_by_no_flush(instance: i32, dx: i32, dy: i32) -> i32 {
    unsafe { element_scroll_by_no_flush(instance, dx, dy) }
}
extern "C" {
    fn element_get_as_flex_container(instance: i32) -> i32;
}

pub fn get_as_flex_container(instance: i32) -> i32 {
    unsafe { element_get_as_flex_container(instance) }
}
extern "C" {
    fn element_get_grid_fragments(instance: i32) -> i32;
}

pub fn get_grid_fragments(instance: i32) -> i32 {
    unsafe { element_get_grid_fragments(instance) }
}
extern "C" {
    fn element_get_transform_to_ancestor(instance: i32, ancestor: i32) -> i32;
}

pub fn get_transform_to_ancestor(instance: i32, ancestor: i32) -> i32 {
    unsafe { element_get_transform_to_ancestor(instance, ancestor) }
}
extern "C" {
    fn element_get_transform_to_parent(instance: i32) -> i32;
}

pub fn get_transform_to_parent(instance: i32) -> i32 {
    unsafe { element_get_transform_to_parent(instance) }
}
extern "C" {
    fn element_get_transform_to_viewport(instance: i32) -> i32;
}

pub fn get_transform_to_viewport(instance: i32) -> i32 {
    unsafe { element_get_transform_to_viewport(instance) }
}
extern "C" {
    fn element_get_client_rects(instance: i32) -> i32;
}

pub fn get_client_rects(instance: i32) -> i32 {
    unsafe { element_get_client_rects(instance) }
}
extern "C" {
    fn element_get_bounding_client_rect(instance: i32) -> i32;
}

pub fn get_bounding_client_rect(instance: i32) -> i32 {
    unsafe { element_get_bounding_client_rect(instance) }
}
extern "C" {
    fn element_scroll_into_view(instance: i32, arg: i32);
}

pub fn scroll_into_view(instance: i32, arg: i32) {
    unsafe { element_scroll_into_view(instance, arg) }
}
extern "C" {
    fn element_get_scroll_top(instance: DOMReference) -> i32;
    fn element_set_scroll_top(instance: DOMReference, value: i32);
}

pub fn get_scroll_top(instance: DOMReference) -> i32 {
    unsafe { element_get_scroll_top(instance) }
}

pub fn set_scroll_top(instance: DOMReference, value: i32) {
    unsafe {
        element_set_scroll_top(instance, value);
    }
}
extern "C" {
    fn element_get_scroll_left(instance: DOMReference) -> i32;
    fn element_set_scroll_left(instance: DOMReference, value: i32);
}

pub fn get_scroll_left(instance: DOMReference) -> i32 {
    unsafe { element_get_scroll_left(instance) }
}

pub fn set_scroll_left(instance: DOMReference, value: i32) {
    unsafe {
        element_set_scroll_left(instance, value);
    }
}
extern "C" {
    fn element_get_scroll_width(instance: DOMReference) -> i32;
    fn element_set_scroll_width(instance: DOMReference, value: i32);
}

pub fn get_scroll_width(instance: DOMReference) -> i32 {
    unsafe { element_get_scroll_width(instance) }
}

pub fn set_scroll_width(instance: DOMReference, value: i32) {
    unsafe {
        element_set_scroll_width(instance, value);
    }
}
extern "C" {
    fn element_get_scroll_height(instance: DOMReference) -> i32;
    fn element_set_scroll_height(instance: DOMReference, value: i32);
}

pub fn get_scroll_height(instance: DOMReference) -> i32 {
    unsafe { element_get_scroll_height(instance) }
}

pub fn set_scroll_height(instance: DOMReference, value: i32) {
    unsafe {
        element_set_scroll_height(instance, value);
    }
}
extern "C" {
    fn element_scroll(instance: i32, x: i32, y: i32);
}

pub fn scroll(instance: i32, x: i32, y: i32) {
    unsafe { element_scroll(instance, x, y) }
}
extern "C" {
    fn element_scroll_to(instance: i32, x: i32, y: i32);
}

pub fn scroll_to(instance: i32, x: i32, y: i32) {
    unsafe { element_scroll_to(instance, x, y) }
}
extern "C" {
    fn element_scroll_by(instance: i32, x: i32, y: i32);
}

pub fn scroll_by(instance: i32, x: i32, y: i32) {
    unsafe { element_scroll_by(instance, x, y) }
}
extern "C" {
    fn element_get_client_top(instance: DOMReference) -> i32;
    fn element_set_client_top(instance: DOMReference, value: i32);
}

pub fn get_client_top(instance: DOMReference) -> i32 {
    unsafe { element_get_client_top(instance) }
}

pub fn set_client_top(instance: DOMReference, value: i32) {
    unsafe {
        element_set_client_top(instance, value);
    }
}
extern "C" {
    fn element_get_client_left(instance: DOMReference) -> i32;
    fn element_set_client_left(instance: DOMReference, value: i32);
}

pub fn get_client_left(instance: DOMReference) -> i32 {
    unsafe { element_get_client_left(instance) }
}

pub fn set_client_left(instance: DOMReference, value: i32) {
    unsafe {
        element_set_client_left(instance, value);
    }
}
extern "C" {
    fn element_get_client_width(instance: DOMReference) -> i32;
    fn element_set_client_width(instance: DOMReference, value: i32);
}

pub fn get_client_width(instance: DOMReference) -> i32 {
    unsafe { element_get_client_width(instance) }
}

pub fn set_client_width(instance: DOMReference, value: i32) {
    unsafe {
        element_set_client_width(instance, value);
    }
}
extern "C" {
    fn element_get_client_height(instance: DOMReference) -> i32;
    fn element_set_client_height(instance: DOMReference, value: i32);
}

pub fn get_client_height(instance: DOMReference) -> i32 {
    unsafe { element_get_client_height(instance) }
}

pub fn set_client_height(instance: DOMReference, value: i32) {
    unsafe {
        element_set_client_height(instance, value);
    }
}
extern "C" {
    fn element_get_inner_html(instance: DOMReference) -> CString;
    fn element_set_inner_html(instance: DOMReference, value: CString);
}

pub fn get_inner_html(instance: DOMReference) -> String {
    unsafe { to_string(element_get_inner_html(instance)) }
}

pub fn set_inner_html(instance: DOMReference, value: &str) {
    unsafe {
        element_set_inner_html(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_get_outer_html(instance: DOMReference) -> CString;
    fn element_set_outer_html(instance: DOMReference, value: CString);
}

pub fn get_outer_html(instance: DOMReference) -> String {
    unsafe { to_string(element_get_outer_html(instance)) }
}

pub fn set_outer_html(instance: DOMReference, value: &str) {
    unsafe {
        element_set_outer_html(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_insert_adjacent_html(instance: i32, position: CString, text: CString);
}

pub fn insert_adjacent_html(instance: i32, position: &str, text: &str) {
    unsafe { element_insert_adjacent_html(instance, to_cstring(position), to_cstring(text)) }
}
extern "C" {
    fn element_query_selector(instance: i32, selectors: CString) -> i32;
}

pub fn query_selector(instance: i32, selectors: &str) -> i32 {
    unsafe { element_query_selector(instance, to_cstring(selectors)) }
}
extern "C" {
    fn element_query_selector_all(instance: i32, selectors: CString) -> i32;
}

pub fn query_selector_all(instance: i32, selectors: &str) -> i32 {
    unsafe { element_query_selector_all(instance, to_cstring(selectors)) }
}
extern "C" {
    fn element_get_shadow_root(instance: DOMReference) -> i32;
    fn element_set_shadow_root(instance: DOMReference, value: i32);
}

pub fn get_shadow_root(instance: DOMReference) -> i32 {
    unsafe { element_get_shadow_root(instance) }
}

pub fn set_shadow_root(instance: DOMReference, value: i32) {
    unsafe {
        element_set_shadow_root(instance, value);
    }
}
extern "C" {
    fn element_get_open_or_closed_shadow_root(instance: DOMReference) -> i32;
    fn element_set_open_or_closed_shadow_root(instance: DOMReference, value: i32);
}

pub fn get_open_or_closed_shadow_root(instance: DOMReference) -> i32 {
    unsafe { element_get_open_or_closed_shadow_root(instance) }
}

pub fn set_open_or_closed_shadow_root(instance: DOMReference, value: i32) {
    unsafe {
        element_set_open_or_closed_shadow_root(instance, value);
    }
}
extern "C" {
    fn element_get_assigned_slot(instance: DOMReference) -> i32;
    fn element_set_assigned_slot(instance: DOMReference, value: i32);
}

pub fn get_assigned_slot(instance: DOMReference) -> i32 {
    unsafe { element_get_assigned_slot(instance) }
}

pub fn set_assigned_slot(instance: DOMReference, value: i32) {
    unsafe {
        element_set_assigned_slot(instance, value);
    }
}
extern "C" {
    fn element_get_slot(instance: DOMReference) -> CString;
    fn element_set_slot(instance: DOMReference, value: CString);
}

pub fn get_slot(instance: DOMReference) -> String {
    unsafe { to_string(element_get_slot(instance)) }
}

pub fn set_slot(instance: DOMReference, value: &str) {
    unsafe {
        element_set_slot(instance, to_cstring(value));
    }
}
extern "C" {
    fn element_request_fullscreen(instance: i32);
}

pub fn request_fullscreen(instance: i32) {
    unsafe { element_request_fullscreen(instance) }
}
extern "C" {
    fn element_request_pointer_lock(instance: i32);
}

pub fn request_pointer_lock(instance: i32) {
    unsafe { element_request_pointer_lock(instance) }
}
extern "C" {
    fn element_get_children(instance: DOMReference) -> i32;
    fn element_set_children(instance: DOMReference, value: i32);
}

pub fn get_children(instance: DOMReference) -> i32 {
    unsafe { element_get_children(instance) }
}

pub fn set_children(instance: DOMReference, value: i32) {
    unsafe {
        element_set_children(instance, value);
    }
}
extern "C" {
    fn element_get_first_element_child(instance: DOMReference) -> i32;
    fn element_set_first_element_child(instance: DOMReference, value: i32);
}

pub fn get_first_element_child(instance: DOMReference) -> i32 {
    unsafe { element_get_first_element_child(instance) }
}

pub fn set_first_element_child(instance: DOMReference, value: i32) {
    unsafe {
        element_set_first_element_child(instance, value);
    }
}
extern "C" {
    fn element_get_last_element_child(instance: DOMReference) -> i32;
    fn element_set_last_element_child(instance: DOMReference, value: i32);
}

pub fn get_last_element_child(instance: DOMReference) -> i32 {
    unsafe { element_get_last_element_child(instance) }
}

pub fn set_last_element_child(instance: DOMReference, value: i32) {
    unsafe {
        element_set_last_element_child(instance, value);
    }
}
extern "C" {
    fn element_get_child_element_count(instance: DOMReference) -> i32;
    fn element_set_child_element_count(instance: DOMReference, value: i32);
}

pub fn get_child_element_count(instance: DOMReference) -> i32 {
    unsafe { element_get_child_element_count(instance) }
}

pub fn set_child_element_count(instance: DOMReference, value: i32) {
    unsafe {
        element_set_child_element_count(instance, value);
    }
}
extern "C" {
    fn element_prepend(instance: i32, nodes: i32);
}

pub fn prepend(instance: i32, nodes: i32) {
    unsafe { element_prepend(instance, nodes) }
}
extern "C" {
    fn element_append(instance: i32, nodes: i32);
}

pub fn append(instance: i32, nodes: i32) {
    unsafe { element_append(instance, nodes) }
}
extern "C" {
    fn element_before(instance: i32, nodes: i32);
}

pub fn before(instance: i32, nodes: i32) {
    unsafe { element_before(instance, nodes) }
}
extern "C" {
    fn element_after(instance: i32, nodes: i32);
}

pub fn after(instance: i32, nodes: i32) {
    unsafe { element_after(instance, nodes) }
}
extern "C" {
    fn element_replace_with(instance: i32, nodes: i32);
}

pub fn replace_with(instance: i32, nodes: i32) {
    unsafe { element_replace_with(instance, nodes) }
}
extern "C" {
    fn element_remove(instance: i32);
}

pub fn remove(instance: i32) {
    unsafe { element_remove(instance) }
}
extern "C" {
    fn element_get_previous_element_sibling(instance: DOMReference) -> i32;
    fn element_set_previous_element_sibling(instance: DOMReference, value: i32);
}

pub fn get_previous_element_sibling(instance: DOMReference) -> i32 {
    unsafe { element_get_previous_element_sibling(instance) }
}

pub fn set_previous_element_sibling(instance: DOMReference, value: i32) {
    unsafe {
        element_set_previous_element_sibling(instance, value);
    }
}
extern "C" {
    fn element_get_next_element_sibling(instance: DOMReference) -> i32;
    fn element_set_next_element_sibling(instance: DOMReference, value: i32);
}

pub fn get_next_element_sibling(instance: DOMReference) -> i32 {
    unsafe { element_get_next_element_sibling(instance) }
}

pub fn set_next_element_sibling(instance: DOMReference, value: i32) {
    unsafe {
        element_set_next_element_sibling(instance, value);
    }
}