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
|
<h2>Full example</h2>
<pre><code>[Exposed=Window]
interface Paint { };
[Exposed=Window]
interface SolidColor : Paint {
attribute double red;
attribute double green;
attribute double blue;
};
[Exposed=Window]
interface Pattern : Paint {
attribute DOMString imageURL;
};
[Exposed=Window]
interface GraphicalWindow {
constructor();
readonly attribute unsigned long width;
readonly attribute unsigned long height;
attribute Paint currentPaint;
undefined drawRectangle(double x, double y, double width, double height);
undefined drawText(double x, double y, DOMString text);
};</code></pre>
|