basic.html revision c31ae0e3c3d2726907b1876b5fe81cfd94527d5d
<!doctype html>
<html>
<head>
<title>Test Page</title>
.yui-skin-sam #c .yui-console {
position: relative;
top: auto;
right: auto;
}
#c {
margin-bottom: 1em;
}
</style>
</head>
<body class="yui-skin-sam">
<div class="markup">
<div id="c"></div>
<input type="button" id="foo" value="Log foo msg">
<input type="button" id="info" value="Log info msg">
<input type="button" id="warn" value="Log warn msg">
<input type="button" id="error" value="Log error msg">
<button type="button" id="hide">Hide</button>
<button type="button" id="show">Show</button>
<button type="button" id="collapse">Collapse</button>
<button type="button" id="expand">Expand</button>
<button type="button" id="destroy">Destroy</button>
<button type="button" id="throttle">Throttle</button>
</div>
<script type="text/javascript">
YUI({
base: '/build/',
useBrowserConsole:false,
//logLevel: 'warn',
filter: 'debug',
logInclude : { global: true }
}).use('console',function (Y) {
var x = {
foo : 0,
info : 0,
warn : 0,
error : 0
};
Y.get('#hide').on('click', function () { yconsole.hide(); });
Y.get('#show').on('click', function () { yconsole.show(); });
Y.get('#collapse').on('click', function () { yconsole.collapse(); });
Y.get('#expand').on('click', function () { yconsole.expand(); });
Y.get('#destroy').on('click', function () { yconsole.destroy(); });
Y.get('#throttle').on('click', function () {
for (var i = 0; i < 500; ++i) {
}
});
//verbose : true,
//consoleLimit : 10,
logLevel : "Garbage",
newestOnTop : false
});
yconsole.render('#c');
Y.log('testing');
});
</script>
</body>
</html>