all repos — NoPaste @ 29b774f090102303e43cf939b38ac2083e62d9f1

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/webidl/index.html (view raw)

 1<!doctype html>
 2
 3<title>CodeMirror: Web IDL mode</title>
 4<meta charset="utf-8">
 5<link rel="stylesheet" href="../../doc/docs.css">
 6<link rel="stylesheet" href="../../lib/codemirror.css">
 7<script src="../../lib/codemirror.js"></script>
 8<script src="../../addon/edit/matchbrackets.js"></script>
 9<script src="webidl.js"></script>
10<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
11
12<div id="nav">
13  <a href="https://codemirror.net"><h1>CodeMirror</h1><img id="logo" src="../../doc/logo.png"></a>
14
15  <ul>
16    <li><a href="../../index.html">Home</a>
17    <li><a href="../../doc/manual.html">Manual</a>
18    <li><a href="https://github.com/codemirror/codemirror">Code</a>
19  </ul>
20  <ul>
21    <li><a href="../index.html">Language modes</a>
22    <li><a class="active" href="#">Web IDL</a>
23  </ul>
24</div>
25
26<article>
27  <h2>Web IDL mode</h2>
28
29  <div>
30<textarea id="code" name="code">
31[NamedConstructor=Image(optional unsigned long width, optional unsigned long height)]
32interface HTMLImageElement : HTMLElement {
33           attribute DOMString alt;
34           attribute DOMString src;
35           attribute DOMString srcset;
36           attribute DOMString sizes;
37           attribute DOMString? crossOrigin;
38           attribute DOMString useMap;
39           attribute boolean isMap;
40           attribute unsigned long width;
41           attribute unsigned long height;
42  readonly attribute unsigned long naturalWidth;
43  readonly attribute unsigned long naturalHeight;
44  readonly attribute boolean complete;
45  readonly attribute DOMString currentSrc;
46
47  // also has obsolete members
48};
49
50partial interface HTMLImageElement {
51  attribute DOMString name;
52  attribute DOMString lowsrc;
53  attribute DOMString align;
54  attribute unsigned long hspace;
55  attribute unsigned long vspace;
56  attribute DOMString longDesc;
57
58  [TreatNullAs=EmptyString] attribute DOMString border;
59};
60</textarea>
61  </div>
62
63  <script>
64    var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
65      lineNumbers: true,
66      matchBrackets: true
67    });
68  </script>
69
70  <p><strong>MIME type defined:</strong> <code>text/x-webidl</code>.</p>
71</article>