]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/gtkmathview-bonobo/test/embedding.html
* added embedding test (HTML)
[helm.git] / helm / gtkmathview-bonobo / test / embedding.html
diff --git a/helm/gtkmathview-bonobo/test/embedding.html b/helm/gtkmathview-bonobo/test/embedding.html
new file mode 100644 (file)
index 0000000..674012f
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0"?>
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<head>
+  <script language="JavaScript">
+<!--
+    function set_object_size(id, width, height)
+    {
+      document[id].width = width;
+      document[id].height = height;
+    }
+-->
+  </script>
+</head>
+
+<body>
+
+  <h1>GtkMathView-Bonobo test page</h1>
+
+  The embedded object should display a mathematical formula.
+  <br />
+
+  <object name="MATH" data="#math1" width="500" height="100" type="application/mathml+xml">
+    <math id="math1" display="block" xmlns="http://www.w3.org/1998/Math/MathML">
+       <mfrac>
+         <mi href="http://www.google.it">x</mi>
+         <mn>2</mn>
+       </mfrac>
+      <mo>=</mo>
+      <mtext href="javascript:alert('like if I can do that')">click for the answer</mtext>
+    </math>
+  </object>
+
+  <form name="test">
+    <input name="eccolo" type="button" onClick="set_object_size('MATH', 100, 50)" value="Size"/>
+  </form>
+
+</body>
+
+</html>
+