script-handle-01-b
|
SVG Image
|
PNG Image
|
script-handle-01-b
This test validates scripting support by using a simple mouse event
handler and manipulating the DOM with the ECMA binding DOM API.
Event and DOM Access Test
Click on target
Scripting Test Passed!
function onMouseClick(evt) {
// Get Document
var target = evt.target;
var doc = target.ownerDocument;
// Make test result visible
var testPassed = doc.getElementById('testPassed');
testPassed.setAttribute('visibility', 'visible');
// Make target invisible
var target = doc.getElementById('target');
target.setAttribute('visibility', 'hidden');
}
$Revision: 1.1 $
|
|
|
Tests basic mouse event handler and DOM manipulation through
ECMA script binding.
The test uses ECMA Script and initially displays a target with
a message asking the user to click on the target. Once the user
has done so, and if both event handling and DOM manipulation are
supported, then the target and initial text are hidden and a text
message indicating that the test was successful is displayed.