| 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 22 matching lines...) Expand all Loading... |
| 33 ImplementedAs=DOMSelection | 33 ImplementedAs=DOMSelection |
| 34 ] interface Selection { | 34 ] interface Selection { |
| 35 readonly attribute Node anchorNode; | 35 readonly attribute Node anchorNode; |
| 36 readonly attribute long anchorOffset; | 36 readonly attribute long anchorOffset; |
| 37 readonly attribute Node focusNode; | 37 readonly attribute Node focusNode; |
| 38 readonly attribute long focusOffset; | 38 readonly attribute long focusOffset; |
| 39 | 39 |
| 40 readonly attribute boolean isCollapsed; | 40 readonly attribute boolean isCollapsed; |
| 41 readonly attribute long rangeCount; | 41 readonly attribute long rangeCount; |
| 42 | 42 |
| 43 [RaisesException] void collapse([Default=Undefined] optional Node node, | 43 [RaisesException] void collapse([Default=Undefined] optional Node node, |
| 44 [Default=Undefined] optional long index); | 44 [Default=Undefined] optional long index); |
| 45 [RaisesException] void collapseToEnd(); | 45 [RaisesException] void collapseToEnd(); |
| 46 [RaisesException] void collapseToStart(); | 46 [RaisesException] void collapseToStart(); |
| 47 | 47 |
| 48 void deleteFromDocument(); | 48 void deleteFromDocument(); |
| 49 boolean containsNode([Default=Undefined] optional Node node, | 49 boolean containsNode([Default=Undefined] optional Node node, |
| 50 [Default=Undefined] optional boolean allowPartial); | 50 [Default=Undefined] optional boolean allowPartial); |
| 51 [RaisesException] void selectAllChildren([Default=Undefined] optional Node n
ode); | 51 [RaisesException] void selectAllChildren([Default=Undefined] optional Node n
ode); |
| 52 | 52 |
| 53 [RaisesException] void extend([Default=Undefined] optional Node node, | 53 [RaisesException] void extend([Default=Undefined] optional Node node, |
| 54 [Default=Undefined] optional long offset); | 54 [Default=Undefined] optional long offset); |
| 55 | 55 |
| 56 [RaisesException] Range getRangeAt([Default=Undefined] optional long index); | 56 [RaisesException] Range getRangeAt([Default=Undefined] optional long index); |
| 57 void removeAllRanges(); | 57 void removeAllRanges(); |
| 58 void addRange([Default=Undefined] optional Range range); | 58 void addRange([Default=Undefined] optional Range range); |
| 59 | 59 |
| 60 [NotEnumerable] DOMString toString(); | 60 [NotEnumerable] DOMString toString(); |
| 61 | 61 |
| 62 // WebKit extensions | 62 // WebKit extensions |
| 63 readonly attribute Node baseNode; | 63 readonly attribute Node baseNode; |
| 64 readonly attribute long baseOffset; | 64 readonly attribute long baseOffset; |
| 65 readonly attribute Node extentNode; | 65 readonly attribute Node extentNode; |
| 66 readonly attribute long extentOffset; | 66 readonly attribute long extentOffset; |
| 67 | 67 |
| 68 // WebKit's "type" accessor returns "None", "Range" and "Caret" | 68 // WebKit's "type" accessor returns "None", "Range" and "Caret" |
| 69 // IE's type accessor returns "none", "text" and "control" | 69 // IE's type accessor returns "none", "text" and "control" |
| 70 readonly attribute DOMString type; | 70 readonly attribute DOMString type; |
| 71 | 71 |
| 72 void modify([Default=Undefined] optional DOMString alter, | 72 void modify([Default=Undefined] optional DOMString alter, |
| 73 [Default=Undefined] optional DOMString direction, | 73 [Default=Undefined] optional DOMString direction, |
| 74 [Default=Undefined] optional DOMString granularity); | 74 [Default=Undefined] optional DOMString granularity); |
| 75 [RaisesException] void setBaseAndExtent([Default=Undefined] optional Node ba
seNode, | 75 [RaisesException] void setBaseAndExtent([Default=Undefined] optional Node ba
seNode, |
| 76 [Default=Undefined] optional long baseOffset, | 76 [Default=Undefined] optional long baseOffset, |
| 77 [Default=Undefined] optional Node extentNode, | 77 [Default=Undefined] optional Node extentNode, |
| 78 [Default=Undefined] optional long extentOffset); | 78 [Default=Undefined] optional long extentOffset); |
| 79 [RaisesException] void setPosition([Default=Undefined] optional Node node, | 79 [RaisesException] void setPosition([Default=Undefined] optional Node node, |
| 80 [Default=Undefined] optional long offset); | 80 [Default=Undefined] optional long offset); |
| 81 | 81 |
| 82 // IE extentions | 82 // IE extentions |
| 83 // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx | 83 // http://msdn.microsoft.com/en-us/library/ms535869(VS.85).aspx |
| 84 void empty(); | 84 void empty(); |
| 85 }; | 85 }; |
| 86 | 86 |
| OLD | NEW |