summaryrefslogtreecommitdiff
path: root/javascript/WebIDL/dom-parsing.idl
blob: d2581328e39084d915557ffc4a1c426be31b49a3 (plain)
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
// Retrived from http://www.w3.org/TR/DOM-Parsing/
// Wed Nov  4 15:39:43 GMT 2015
// Manually extracted IDL

enum SupportedType {
  "text/html",
  "text/xml",
  "application/xml",
  "application/xhtml+xml",
  "image/svg+xml"
};

[Constructor]
interface DOMParser {
  [NewObject]
    Document parseFromString (DOMString str, SupportedType type);
};

[Constructor]
interface XMLSerializer {
  DOMString serializeToString (Node root);
};

partial interface Element {
  [TreatNullAs=EmptyString]
    attribute DOMString innerHTML;
  [TreatNullAs=EmptyString]
    attribute DOMString outerHTML;
  void insertAdjacentHTML (DOMString position, DOMString text);
};

partial interface Range {
  [NewObject]
    DocumentFragment createContextualFragment (DOMString fragment);
};