01 
02 /*
03  *  JScripter Standard 1.0 - To Script In Java
04  *  Copyright (C) 2008-2011  J.J.Liu<jianjunliu@126.com> <http://www.jscripter.org>
05  *  
06  *  This program is free software: you can redistribute it and/or modify
07  *  it under the terms of the GNU Affero General Public License as published by
08  *  the Free Software Foundation, either version 3 of the License, or
09  *  (at your option) any later version.
10  *  
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU Affero General Public License for more details.
15  *  
16  *  You should have received a copy of the GNU Affero General Public License
17  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 package js.dom;
21 
22 import js.user.*;
23 
24 /**
25  * <p>An <b>opaque</b> interface from <tt>DocumentRange</tt> interface of DOM Level2 Range.</p>
26  *
27  * @author <a href="mailto:jianjunliu@126.com">J.J.Liu (Jianjun Liu)</a> at <a href="http://www.jscripter.org" target="_blank">http://www.jscripter.org</a>
28  *
29  * @javascript <b>Opaque</b> types can be resolved but no class objects for them can be
30  * generated into the target codes. Re-compilers must exit with error on the operations of
31  * accessing that kind of class objects.
32  * The <tt>checkcast</tt> operation to the class literal of this interface must be ignored
33  * and <tt>instanceof</tt> to it always <tt>true</tt>.
34  */
35 public interface DocumentRange
36 {
37     /**
38      * <p>Creates a new {@link JsRange} object.</p>
39      * <p>This method creates a {@link JsRange} object that can be used to represent a 
40      * region of this document or of a {@link JsDocumentFragment} associated with this 
41      * document.</p>
42      * <p>This method is technically part of the <tt>DocumentRange</tt> interface in DOM2 
43      * specification. It is implemented by the {@link JsDocument} object only in 
44      * implementations that support the {@link JsRange} module. That is in the DOM Specification 
45      * this method is actually defined not by the DOM <tt>Document</tt> interface but by 
46      * the <tt>DocumentRange</tt> interface. If an implementation supports the <tt>Range</tt> 
47      * module, the {@link JsDocument} object always implements <tt>DocumentRange</tt> and 
48      * defines this method. Internet Explorer does not support this module.</p>
49      * @return A newly created {@link JsRange} object with both boundary points set to the 
50      * beginning of the document. 
51      * @since 1.0
52      * @javascript Re-compilers must convert the interface invocation of this method directly
53      * into a JavaScript invocation on its current object instance without changing the 
54      * method name, but expanding variable arguments, if any, into comma-separated values. 
55      */
56     public JsRange createRange();
57 }