forked from davglass/nodejs-yui3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tnt-calendar-script.js
executable file
·44 lines (35 loc) · 1.01 KB
/
tnt-calendar-script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env node
var sys = require('sys'),
fs = require('fs');
var YUI = require("yui3").YUI;
require("assert").equal( global.YUI, undefined, "global yui created");
YUI({
filter: 'debug',
_logExclude: {
'attribute': true,
'base': true,
'get': true,
'loader': true,
'yui': true,
'widget': true,
'event': true
},
debug: true
}).use('nodejs-dom', function(Y) {
document = Y.Browser.document;
navigator = Y.Browser.navigator;
window = Y.Browser.window;
Y.use('yui2-calendar', 'yui2-logger', function() {
var YAHOO = Y.YUI2;
Y.log('JSDom testing..');
var el = document.createElement('div');
el.id = 'cal1Container';
document.body.appendChild(el);
var cal1 = new YAHOO.widget.Calendar("cal1Container");
cal1.renderEvent.subscribe(function() {
Y.log('Done..');
Y.log(document.outerHTML, 'HTML');
});
cal1.render();
});
});