Appendix C: ECMAScript Language Binding
This appendix contains the complete ECMAScript [ECMAScript] binding for the Level 3 Document Object Model Load
and Save definitions.
- Properties of the LSException Constructor function:
-
- LSException.PARSE_ERR
-
The value of the constant LSException.PARSE_ERR is 81.
- LSException.SERIALIZE_ERR
-
The value of the constant LSException.SERIALIZE_ERR is 82.
- Objects that implement the LSException interface:
-
- Properties of objects that implement the LSException interface:
- code
-
This property is
a Number.
- Properties of the DOMImplementationLS Constructor function:
-
- DOMImplementationLS.MODE_SYNCHRONOUS
-
The value of the constant DOMImplementationLS.MODE_SYNCHRONOUS is 1.
- DOMImplementationLS.MODE_ASYNCHRONOUS
-
The value of the constant DOMImplementationLS.MODE_ASYNCHRONOUS is 2.
- Objects that implement the DOMImplementationLS interface:
-
- Functions of objects that implement the DOMImplementationLS interface:
- createLSParser(mode, schemaType)
- This function returns an object that implements the LSParser interface.
The mode parameter is a Number.
The schemaType parameter is a String.
This function can raise an object that implements the DOMException interface.
- createLSSerializer()
- This function returns an object that implements the LSSerializer interface.
- createLSInput()
- This function returns an object that implements the LSInput interface.
- createLSOutput()
- This function returns an object that implements the LSOutput interface.
- Properties of the LSParser Constructor function:
-
- LSParser.ACTION_APPEND_AS_CHILDREN
-
The value of the constant LSParser.ACTION_APPEND_AS_CHILDREN is 1.
- LSParser.ACTION_REPLACE_CHILDREN
-
The value of the constant LSParser.ACTION_REPLACE_CHILDREN is 2.
- LSParser.ACTION_INSERT_BEFORE
-
The value of the constant LSParser.ACTION_INSERT_BEFORE is 3.
- LSParser.ACTION_INSERT_AFTER
-
The value of the constant LSParser.ACTION_INSERT_AFTER is 4.
- LSParser.ACTION_REPLACE
-
The value of the constant LSParser.ACTION_REPLACE is 5.
- Objects that implement the LSParser interface:
-
- Properties of objects that implement the LSParser interface:
- domConfig
-
This read-only property is an object that implements the DOMConfiguration interface.
- filter
-
This property is an object that implements the LSParserFilter interface.
- async
-
This read-only property is a Boolean.
- busy
-
This read-only property is a Boolean.
- Functions of objects that implement the LSParser interface:
- parse(input)
- This function returns an object that implements the Document interface.
The input parameter is an object that implements the LSInput interface.
This function can raise an object that implements the DOMException interface or the LSException interface.
- parseURI(uri)
- This function returns an object that implements the Document interface.
The uri parameter is a String.
This function can raise an object that implements the DOMException interface or the LSException interface.
- parseWithContext(input, contextArg, action)
- This function returns an object that implements the Node interface.
The input parameter is an object that implements the LSInput interface.
The contextArg parameter is an object that implements the Node interface.
The action parameter is a Number.
This function can raise an object that implements the DOMException interface or the LSException interface.
- abort()
- This function has no return value.
- Objects that implement the LSInput interface:
-
- Properties of objects that implement the LSInput interface:
- byteStream
-
This property is an object that implements the Object interface.
- stringData
-
This property is a String.
- systemId
-
This property is a String.
- publicId
-
This property is a String.
- baseURI
-
This property is a String.
- encoding
-
This property is a String.
- certifiedText
-
This property is a Boolean.
- LSResourceResolver function:
-
- This function returns an object that implements the LSInput interface. The first parameter is a String.
The second parameter is a String.
The third parameter is a String.
The fourth parameter is a String.
The fifth parameter is a String.
- Properties of the LSParserFilter Constructor function:
-
- LSParserFilter.FILTER_ACCEPT
-
The value of the constant LSParserFilter.FILTER_ACCEPT is 1.
- LSParserFilter.FILTER_REJECT
-
The value of the constant LSParserFilter.FILTER_REJECT is 2.
- LSParserFilter.FILTER_SKIP
-
The value of the constant LSParserFilter.FILTER_SKIP is 3.
- LSParserFilter.FILTER_INTERRUPT
-
The value of the constant LSParserFilter.FILTER_INTERRUPT is 4.
- Objects that implement the LSParserFilter interface:
-
- Properties of objects that implement the LSParserFilter interface:
- whatToShow
-
This read-only property is a Number.
- Functions of objects that implement the LSParserFilter interface:
- startElement(elementArg)
- This function returns a Number.
The elementArg parameter is an object that implements the Element interface.
- acceptNode(nodeArg)
- This function returns a Number.
The nodeArg parameter is an object that implements the Node interface.
- Objects that implement the LSProgressEvent interface:
-
- Objects that implement the LSProgressEvent interface have all properties and functions of the Event interface as well as the properties and functions defined below.
- Properties of objects that implement the LSProgressEvent interface:
- input
-
This read-only property is an object that implements the LSInput interface.
- position
-
This read-only property is a Number.
- totalSize
-
This read-only property is a Number.
- Objects that implement the LSLoadEvent interface:
-
- Objects that implement the LSLoadEvent interface have all properties and functions of the Event interface as well as the properties and functions defined below.
- Properties of objects that implement the LSLoadEvent interface:
- newDocument
-
This read-only property is an object that implements the Document interface.
- input
-
This read-only property is an object that implements the LSInput interface.
- Objects that implement the LSSerializer interface:
-
- Properties of objects that implement the LSSerializer interface:
- domConfig
-
This read-only property is an object that implements the DOMConfiguration interface.
- newLine
-
This property is a String.
- filter
-
This property is an object that implements the LSSerializerFilter interface.
- Functions of objects that implement the LSSerializer interface:
- write(nodeArg, destination)
- This function returns a Boolean.
The nodeArg parameter is an object that implements the Node interface.
The destination parameter is an object that implements the LSOutput interface.
This function can raise an object that implements the LSException interface.
- writeToURI(nodeArg, uri)
- This function returns a Boolean.
The nodeArg parameter is an object that implements the Node interface.
The uri parameter is a String.
This function can raise an object that implements the LSException interface.
- writeToString(nodeArg)
- This function returns a String.
The nodeArg parameter is an object that implements the Node interface.
This function can raise an object that implements the DOMException interface or the LSException interface.
- Objects that implement the LSOutput interface:
-
- Properties of objects that implement the LSOutput interface:
- byteStream
-
This property is an object that implements the Object interface.
- systemId
-
This property is a String.
- encoding
-
This property is a String.
- Objects that implement the LSSerializerFilter interface:
-
- Objects that implement the LSSerializerFilter interface have all properties and functions of the NodeFilter interface as well as the properties and functions defined below.
- Properties of objects that implement the LSSerializerFilter interface:
- whatToShow
-
This read-only property is a Number.