fixed bug in property generation on the JS DOM API

This commit is contained in:
James Strachan
2012-06-01 11:40:30 +01:00
parent 32b70db6b2
commit 23db5d7fc8
3 changed files with 45 additions and 39 deletions
+8 -3
View File
@@ -11,9 +11,10 @@ import java.lang.IndexOutOfBoundsException
// Properties
var Node.text : String
get() {
return textContent
/*
if (this.nodeType == Node.ELEMENT_NODE) {
val buffer = StringBuilder()
val nodeList = this.childNodes
@@ -34,9 +35,12 @@ get() {
} else {
return this.nodeValue
}
*/
}
set(value) {
if (this.nodeType == Node.ELEMENT_NODE) {
textContent = value
/*
if (nodeType == Node.ELEMENT_NODE) {
val element = this as Element
// lets remove all the previous text nodes first
for (node in element.children()) {
@@ -46,8 +50,9 @@ set(value) {
}
element.addText(value)
} else {
this.setNodeValue(value)
nodeValue = value
}
*/
}
var Element.id : String