Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: 0.8
Fetching contributors…

Cannot retrieve contributors at this time

32 lines (23 sloc) 0.838 kb
from pyjamas.ui.RootPanel import RootPanel
from pyjamas import DOM
from UnitTest import UnitTest
from __pyjamas__ import doc
class DOMTest(UnitTest):
def testDivHTML(self):
e = DOM.getElementById('tests')
div = DOM.createElement('div')
DOM.appendChild(e, div)
DOM.setInnerHTML(div, 'hello world\n')
self.write_test_output('addDiv')
DOM.removeChild(e, div)
self.write_test_output('removeDiv')
def testDivText(self):
e = DOM.getElementById('tests')
div = DOM.createElement('div')
DOM.appendChild(e, div)
div2 = DOM.createElement('div')
DOM.appendChild(div, div2)
DOM.setInnerText(div2, 'hello world\n')
self.write_test_output('addDiv')
DOM.removeChild(e, div)
self.write_test_output('removeDiv')
Jump to Line
Something went wrong with that request. Please try again.