summaryrefslogtreecommitdiffstats
path: root/ksvg/test/ecma/circle.svg
diff options
context:
space:
mode:
Diffstat (limited to 'ksvg/test/ecma/circle.svg')
-rw-r--r--ksvg/test/ecma/circle.svg38
1 files changed, 38 insertions, 0 deletions
diff --git a/ksvg/test/ecma/circle.svg b/ksvg/test/ecma/circle.svg
new file mode 100644
index 00000000..e9b198c3
--- /dev/null
+++ b/ksvg/test/ecma/circle.svg
@@ -0,0 +1,38 @@
+<?xml version="1.0" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="6cm" height="5cm" viewBox="0 0 600 500" onload="foobar(evt)">
+ <script type="text/ecmascript"> <![CDATA[
+ function foobar(evt)
+ {
+ var circle = evt.getTarget().ownerDocument.getElementById('moo');
+
+ var id = circle.id; // Should call SVGElementImpl::getValueProperty
+
+ var name = circle; // Should call toString()
+
+ var nodeName = circle.nodeName;
+
+ var prop = circle.cx; // Should call SVGCircleElementImpl::getValueProperty
+
+ alert('NODENAME: ' + nodeName + '\nID: ' + id + '\nNAME: ' + name + '\nPROP: ' + prop.baseVal.value);
+ }
+
+ function click(evt)
+ {
+ var circle = evt.target;
+
+ var id = circle.id; // Should call SVGElementImpl::getValueProperty
+
+ var name = circle; // Should call toString()
+
+ var nodeName = circle.nodeName;
+
+ var prop = circle.cx; // Should call SVGCircleElementImpl::getValueProperty
+
+ alert('NODENAME: ' + nodeName + '\nID: ' + id + '\nNAME: ' + name + '\nPROP: ' + prop.baseVal.value);
+ }
+
+ ]]> </script>
+
+ <circle id="moo" onclick="click(evt)" cx="300" cy="225" r="100" fill="red"/>
+</svg>