OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 Apple Inc. All rights reserved. |
3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * | 8 * |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 readonly attribute long rangeCount; | 60 readonly attribute long rangeCount; |
61 [RaisesException] Range getRangeAt([Default=Undefined] optional long index); | 61 [RaisesException] Range getRangeAt([Default=Undefined] optional long index); |
62 void addRange([Default=Undefined] optional Range range); | 62 void addRange([Default=Undefined] optional Range range); |
63 void removeAllRanges(); | 63 void removeAllRanges(); |
64 | 64 |
65 [NotEnumerable] stringifier; | 65 [NotEnumerable] stringifier; |
66 | 66 |
67 // Firefox extensions | 67 // Firefox extensions |
68 // https://developer.mozilla.org/En/DOM/Selection | 68 // https://developer.mozilla.org/En/DOM/Selection |
69 // | 69 // |
70 // FIXME: Add use counters. | 70 [MeasureAs=SelectionContainsNode] boolean containsNode([Default = Undefined]
optional Node node, [Default = Undefined] optional boolean allowPartial); |
71 boolean containsNode([Default = Undefined] optional Node node, [Default = Un
defined] optional boolean allowPartial); | |
72 | 71 |
73 // WebKit extensions | 72 // WebKit extensions |
74 [MeasureAs=SelectionBaseNode] readonly attribute Node baseNode; | 73 [MeasureAs=SelectionBaseNode] readonly attribute Node baseNode; |
75 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; | 74 [MeasureAs=SelectionBaseOffset] readonly attribute long baseOffset; |
76 [MeasureAs=SelectionExtentNode] readonly attribute Node extentNode; | 75 [MeasureAs=SelectionExtentNode] readonly attribute Node extentNode; |
77 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; | 76 [MeasureAs=SelectionExtentOffset] readonly attribute long extentOffset; |
78 | 77 |
79 // WebKit's "type" accessor returns "None", "Range" and "Caret" | 78 // WebKit's "type" accessor returns "None", "Range" and "Caret" |
80 // IE's type accessor returns "none", "text" and "control" | 79 // IE's type accessor returns "none", "text" and "control" |
81 [MeasureAs=SelectionType] readonly attribute DOMString type; | 80 [MeasureAs=SelectionType] readonly attribute DOMString type; |
82 | 81 |
83 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, | 82 [MeasureAs=SelectionModify] void modify([Default=Undefined] optional DOMStri
ng alter, |
84 [Default=Undefined] optional DOMStri
ng direction, | 83 [Default=Undefined] optional DOMStri
ng direction, |
85 [Default=Undefined] optional DOMStri
ng granularity); | 84 [Default=Undefined] optional DOMStri
ng granularity); |
86 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent
([Default=Undefined] optional Node baseNode, | 85 [MeasureAs=SelectionSetBaseAndExtent, RaisesException] void setBaseAndExtent
([Default=Undefined] optional Node baseNode, |
87
[Default=Undefined] optional long baseOffset, | 86
[Default=Undefined] optional long baseOffset, |
88
[Default=Undefined] optional Node extentNode, | 87
[Default=Undefined] optional Node extentNode, |
89
[Default=Undefined] optional long extentOffset); | 88
[Default=Undefined] optional long extentOffset); |
90 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException, Ty
peChecking=Interface] void setPosition(Node node, | 89 [ImplementedAs=collapse, MeasureAs=SelectionSetPosition, RaisesException, Ty
peChecking=Interface] void setPosition(Node node, |
91
optional long offset); | 90
optional long offset); |
92 | 91 |
93 // IE extensions | 92 // IE extensions |
94 // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx | 93 // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx |
95 [MeasureAs=SelectionEmpty] void empty(); | 94 [MeasureAs=SelectionEmpty] void empty(); |
96 }; | 95 }; |
OLD | NEW |