move custom_rhino out of plotkit
[dygraphs.git] / plotkit_v091 / doc / SVGCanvasCompat.txt
CommitLineData
6a1aa64f
DV
1{% extends "basex.html" %}
2{% load markup %}
3{% block pageid %}code{% endblock %}
4{% block title %}SVG and Canvas Support Status in Various Browsers.{% endblock %}
5{% block headers %}
6<link href="doc.css" media="screen" rel="stylesheet" type="text/css" />
7{% endblock %}
8
9
10{% block content %}
11<div class="page doc">
12{% filter markdown %}
13State of SVG and Canvas in Modern Browsers
14==========================================
15
16__By: Alastair Tse - Last Updated: 27 April 2006__
17
18
19My friends, just like HTML and CSS, different browsers support
20different subsections of the SVG and Canvas specification. As part of
21my work on PlotKit, the next generation javascript plotting library,
22I've decided to summarise all the quirks in SVG and Canvas support.
23
24Browsers Considered
25===================
26
27I am looking at browsers that are considered "modern" as of
28March 2006. These include:
29
30* [Safari 2.0.x][Safari] (W/ [Adobe SVG Plugin][ASV])
31* [Firefox 1.5.x][Firefox]
32* [Opera 9.0 Preview 2][OperaSnapshot]
33* [Internet Explorer 6][IE6] (w/ [Adobe SVG Plugin][ASV])
34
35I am also looking at some experiemental browsers as of March 2006.
36
37* [Internet Explorer 7 beta 2 preview + ASV][IE7]
38* [Safari WebKit+SVG Nightly 2006-03-11][WebkitNightly]
39* [Firefox Deerpark Nightly 2006-03-11][FirefoxNightly]
40
41[Safari]: http://apple.com/safari/
42[Firefox]: http://www.mozilla.com/firefox/
43[OperaSnapshot]: http://snapshot.opera.com/
44[IE6]: http://www.microsoft.com/windows/ie/
45[ASV]: http://www.adobe.com/svg/
46[IE7]: http://www.microsoft.com/windows/IE/ie7/default.mspx
47[WebkitNightly]: http://nightly.webkit.org/
48[FirefoxNightly]: http://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/latest-trunk/
49
50
51Canvas
52======
53
54* Canvas is defined by the WHATWG in what is known as the
55 [Web Applications 1.0 specification][WHATWG]
56
57Supporting Browsers
58-------------------
59
60* Safari 2.0 and above.
61* Opera 9.0 and above.
62* Firefox 1.5 and above.
63
64Quirks
65------
66
67* __Safari__ will forget a path after ``fill()`` or ``stroke()`` has
68 been called. Therefore, if you need to fill and stroke the same
69 path, you must draw the path out twice.
70
71* __Opera__ will not obey ``stroke()`` for arc paths.
72
73* __Firefox__ and __Opera__ will not draw shadows even with
74 ``shadowStyle`` or ``shadowOffset`` is set on the context object.
75
76SVG
77===
78
79* SVG support is either provided natively, or through the Adobe SVG
80 Viewer (ASV).
81
82Supporting Browsers (Inline)
83----------------------------
84
85* Safari 2.0 + ASV
86* Internet Explorer 6 + ASV
87* Safari Webkit+SVG Nightly
88* Opera 9.0 and above
89* Mozilla Firefox 1.5 and above
90
91Quirks (Inline)
92---------------
93
94* __Safari Nightly__ will not render any ``text`` elements when
95 inlined. (Will do so if using ``embed``)
96
97* __Safari 2.0 + ASV__ will not respect inlined SVG.
98
99* __Internet Explorer 6 + ASV__ will only parse inlined SVG if the
100 following is added to the HTML and all SVG elements are in the
101 correct namespace ``svg:``.
102
103 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
104 xmlns:svg="http://www.w3.org/2000/svg"
105 xmlns:xlink="http://www.w3.org/1999/xlink">
106 ...
107 <body>
108 <!-- START Required for IE to support inlined SVG -->
109 <object id="AdobeSVG"
110 classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2" width="1"
111 height="1"></object>
112 <?import namespace="svg" implementation="#AdobeSVG"?>
113 <!-- END Required for IE to support inlined SVG -->
114 <svg:svg width="300" height="300" baseProfile="full" version="1.1"></svg:svg>
115 </body>
116 </html>
117
118* __Mozilla Firefox (1.5 and nightly) on Mac__ will not render
119 ``text`` elements when inlined. Note that it does for Linux and Windows.
120
121* __Opera 9__ will refuse to draw an element if attribute ``filter``
122 is defined.
123
124* __Internet Explorer 7b2p + ASV__ will not work with the Adobe SVG Viewer.
125
126
127Disclaimer
128==========
129
130The above is presented as-is with my own findings. There may be
131errors. Please do not use this to base your multi-million dollar
132business decisions.
133
134Contact
135=======
136
137If you have anything to add or modify, please contact me at
138<alastair@liquidx.net>.
139
140[WHATWG]: http://whatwg.org/specs/web-apps/current-work/
141
142{% endfilter %}
143</div>
144{% endblock %}