summaryrefslogtreecommitdiffstats
path: root/ksvg/test/ecma/circle.svg
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /ksvg/test/ecma/circle.svg
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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>