Permalink
Browse files

Add `IS_CANVAS_SUPPORTED` test. Add link to `getStyleProperty` test p…

…age. `PRE_ELEMENTS_IGNORE_NEWLINES` also affects Opera up to and including 10a (Opera should stop copying bugs from IE).
  • Loading branch information...
1 parent e94bdd4 commit 81decc16af3475de42e82203b161b074fcb5c88b Juriy Zaytsev committed May 14, 2009
Showing with 23 additions and 2 deletions.
  1. +8 −0 feature_tests.js
  2. +14 −2 index.html
  3. +1 −0 style.html
View
@@ -245,6 +245,14 @@ SOFTWARE.
return null;
})();
+ features.IS_CANVAS_SUPPORTED = (features.__IS_CANVAS_SUPPORTED = function(){
+ if (document.createElement) {
+ var elCanvas = document.createElement('canvas');
+ return !!(elCanvas && elCanvas.getContext && elCanvas.getContext('2d'));
+ }
+ return null;
+ })();
+
// BUGGIES
// Safari returns "function" as typeof HTMLCollection
View
@@ -20,6 +20,7 @@
<p>
All of the tests assume the presence of global <code>document</code> property. Everything else is tested before it's being used.
</p>
+ <p>Also, see tests of some of the <a href="style.html" title="">CSS2/3 properties</a> and corresponding <code>getStyleProperty</code> utility</p>
<p>
<strong>Tested browsers</strong>:
Interner Explorer 5.5-8.0RC1,
@@ -37,7 +38,7 @@
</p>
</div>
<p>
- <span id="last-updated" class="dtstart">Last updated: May 11 2009</span>
+ <span id="last-updated" class="dtstart">Last updated: May 13 2009</span>
</p>
<h2>Features:</h2>
@@ -219,6 +220,17 @@
<td><a href="#" title="show test code" class="show-test-code" name="IS_CSS_TRANSFORMATION_SUPPORTED">show</a></td>
</tr>
<tr style="display:none"><td colspan="5" class="test-code"><pre></pre></td></tr>
+
+ <tr>
+ <td>IS_CANVAS_SUPPORTED</td>
+ <td></td>
+ <td>Most of non-IE, Opera 9.x+</td>
+ <td>
+ Is <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html" title="Specs for canvas element">HTML5 canvas element</a> supported?
+ </td>
+ <td><a href="#" title="show test code" class="show-test-code" name="IS_CANVAS_SUPPORTED">show</a></td>
+ </tr>
+ <tr style="display:none"><td colspan="5" class="test-code"><pre></pre></td></tr>
</tbody>
</table>
@@ -320,7 +332,7 @@
<tr>
<td>PRE_ELEMENTS_IGNORE_NEWLINES</td>
<td></td>
- <td>IE&lt;=7</td>
+ <td>IE&lt;=7, Opera 8.54+</td>
<td></td>
<td><a href="#" title="show test code" class="show-test-code" name="PRE_ELEMENTS_IGNORE_NEWLINES">show</a></td>
</tr>
View
@@ -19,6 +19,7 @@
<script src="getStyleProperty.js" type="text/javascript"></script>
</head>
<body>
+ <p>See <a href="http://thinkweb2.com/projects/prototype/feature-testing-css-properties/" title="">explanation of <code>getStyleProperty</code></a></p>
<script type="text/javascript">
(function(){
var properties;

0 comments on commit 81decc1

Please sign in to comment.