Last change
on this file since 529 was
483,
checked in by hendrikvanantwerpen, 11 years ago
|
Added Dojo 1.9.3 release.
|
File size:
1.1 KB
|
Line | |
---|
1 | <html> |
---|
2 | <head> |
---|
3 | <title>testing dom-style</title> |
---|
4 | <style type="text/css"> |
---|
5 | @import "../resources/dojo.css"; |
---|
6 | .nodeStyle |
---|
7 | { |
---|
8 | padding: 1px 2px 3px 4px; |
---|
9 | } |
---|
10 | </style> |
---|
11 | <script type="text/javascript" src="../dojo.js" data-dojo-config="isDebug:true"></script> |
---|
12 | <script type="text/javascript"> |
---|
13 | require(["dojo", "doh", "dojo/dom-style", "dojo/dom", "dojo/domReady!"], function(dojo, doh, domStyle, dom){ |
---|
14 | doh.register([ |
---|
15 | { |
---|
16 | name: "getComputedStyle", |
---|
17 | runTest: function(t){ |
---|
18 | try { |
---|
19 | var node = dom.byId('node'), |
---|
20 | s = domStyle.getComputedStyle(node); |
---|
21 | doh.t(s !== null); |
---|
22 | // Create a node on the fly, |
---|
23 | // IE < 9 has issue with currentStyle when creating elements on the fly. |
---|
24 | node = document.createElement('div'); |
---|
25 | domStyle.set(node, 'nodeStyle'); |
---|
26 | s = domStyle.getComputedStyle(node); |
---|
27 | doh.t(s !== null); |
---|
28 | } catch (err) { |
---|
29 | console.error(err); |
---|
30 | doh.t(false); |
---|
31 | } |
---|
32 | } |
---|
33 | } |
---|
34 | ]); |
---|
35 | |
---|
36 | doh.run(); |
---|
37 | }); |
---|
38 | </script> |
---|
39 | </head> |
---|
40 | <body> |
---|
41 | <div id="node" style="padding: 1px 2px 3px 4px;"></div> |
---|
42 | </body> |
---|
43 | </html> |
---|
Note: See
TracBrowser
for help on using the repository browser.