Some magic to make test work
This commit is contained in:
@@ -1,27 +1,33 @@
|
||||
package org.w3c.dom
|
||||
|
||||
import js.noImpl
|
||||
|
||||
/**
|
||||
* A stub class definition so we can work with the DOM APIs as native objects
|
||||
*/
|
||||
native public interface Document : Node {
|
||||
native public trait Document : Node {
|
||||
fun getElementById(id : String) : Element = js.noImpl
|
||||
fun createTextNode(text : String) : Node = js.noImpl
|
||||
}
|
||||
|
||||
native public interface Attr : Node {}
|
||||
native public interface CDATASection : Text {}
|
||||
native public interface CharacterData : Node {}
|
||||
native public interface Comment : CharacterData {}
|
||||
native public interface DOMImplementation {}
|
||||
native public interface DocumentType : Node {}
|
||||
native public interface Element : Node {}
|
||||
native public interface Entity : Node {}
|
||||
native public interface EntityReference : Node {}
|
||||
native public interface NameList {}
|
||||
native public interface NamedNodeMap {}
|
||||
native public interface Node {}
|
||||
native public interface NodeList {}
|
||||
native public interface Notation : Node {}
|
||||
native public interface ProcessingInstruction : Node {}
|
||||
native public interface Text : CharacterData {}
|
||||
native public interface TypeInfo {}
|
||||
native public interface UserDataHandler {}
|
||||
native public trait Attr : Node {}
|
||||
native public trait CDATASection : Text {}
|
||||
native public trait CharacterData : Node {}
|
||||
native public trait Comment : CharacterData {}
|
||||
native public trait DOMImplementation {}
|
||||
native public trait DocumentType : Node {}
|
||||
native public trait Element : Node {
|
||||
fun appendChild(child : Node) : Unit = js.noImpl
|
||||
}
|
||||
native public trait Entity : Node {}
|
||||
native public trait EntityReference : Node {}
|
||||
native public trait NameList {}
|
||||
native public trait NamedNodeMap {}
|
||||
native public trait Node {}
|
||||
native public trait NodeList {}
|
||||
native public trait Notation : Node {}
|
||||
native public trait ProcessingInstruction : Node {}
|
||||
native public trait Text : CharacterData {}
|
||||
native public trait TypeInfo {}
|
||||
native public trait UserDataHandler {}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package kotlin.browser
|
||||
|
||||
import org.w3c.dom.Document
|
||||
import js.native
|
||||
import js.library
|
||||
import org.w3c.dom.Document
|
||||
|
||||
/**
|
||||
* Provides access to the current active browsers DOM for the currently visible page.
|
||||
|
||||
Reference in New Issue
Block a user