object.html revision d4dbc3afb5bb9cfd13490b358dc37bf951104ca7
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>YUI 3.0</title>
<script type="text/javascript" src="/build/yui/yui-debug.js"></script>
<script type="text/javascript" src="/build/oop/oop-debug.js"></script>
<script type="text/javascript" src="/build/dump/dump-debug.js"></script>
<script type="text/javascript">
(function() {
var Y = YUI().use('*');
var newobj = {};
var o = {
str: "str",
arr: [
"array1",
true,
{ obj: "obj"},
["array2"]
],
dat: new Date(),
fn: function() {
},
//win: window,
nada: null
};
var O = Y.Object;
Y.log(O.hasKey(o, 'fn'));
Y.log(O.hasKey(o, 'hasOwnProperty'));
Y.log(O.hasValue(o, 'str'));
Y.log(O.hasValue(o, 'arr'));
Y.log(O.keys(o));
Y.log(O.values(o));
Y.log(O.size(o));
})();
</script>
<body>
<input id="addButton" type="button" value="Add link" />
</body>
</html>