History log of /yui3/src/yui/js/yui-object.js
Revision Date Author Comments Expand
3e4a3c30997cfa913fabd7b346e3a71388441bed 12-Jan-2012 Ryan Grove <ryan@wonko.com>

Detect non-native ES5 shims and fall back to our own. This avoids potential issues with libraries that shim native objects with broken implementations, like older Prototype and MooTools, and certain Twitter widgets. The technique used to detect native methods isn't perfect, but works in all modern browsers and has minimal consequences if it fails.

efb046dfa7ee18351c62b6efc9934c09058fcc74 06-Dec-2011 Ryan Grove <ryan@wonko.com>

Y.Object.isEmpty() now casts the given value to an object. This prevents exceptions when it's given a non-object, which is closer to how it behaved pre-3.4.0.

6ed148777f04d35c42c9370c8108484f14be78a2 23-Sep-2011 Ryan Grove <ryan@wonko.com>

Y.Object.keys() workaround for browsers that enumerate "prototype". The non-native fallback implementation of `Y.Object.keys()` now contains a workaround for buggy browsers (like Opera 11.50) that treat function `prototype` properties as enumerable in violation of the ES5 spec. This fixes failing tests in those browsers.

20ed23d33369bdd43b18a992b6fda8cbff77cc2c 10-Sep-2011 Ryan Grove <ryan@wonko.com>

Ensure that Y.Object.size() returns 0 for non-objects. Fixes #2531069 This was the behavior prior to 3.4.0, but regressed in 3.4.0 due to Y.Object.size()'s new dependency on Y.Object.keys().

c30ba277f523653af1fc09ada675584c86f2979c 03-Jun-2011 Ryan Grove <ryan@wonko.com>

Exclude 'constructor' from the list of properties we force IE to enumerate. This was causing the native constructor property to be enumerated even when it shouldn't be.

67e8ed2937abc262dbe7537695d632143294269f 24-May-2011 Ryan Grove <ryan@wonko.com>

Expose _hasEnumBug and _forceEnum as protected properties of Y.Object.

8e3356edb73b10f6622c26b9186418d70fcde68b 11-May-2011 Ryan Grove <ryan@wonko.com>

Check that the window exists before looking for stuff on it. Because we <3 server-side JS!

582df4bc8549d0008b29f98cfe582ad0dc217c9e 09-May-2011 Ryan Grove <ryan@wonko.com>

Improve API docs and readability.

3ecd40c854dca8089986ee76cac93c15f4f5f5f3 09-May-2011 Ryan Grove <ryan@wonko.com>

Refactor values(), size(), and isEmpty() to use keys().

c97ced1ebe127b04e46886f1b43dc0b00672e34b 09-May-2011 Ryan Grove <ryan@wonko.com>

Use native Object.keys when available; handle IE DontEnum keys in the shim. [Fixes #2529986] See the following URLs for details on why it's necessary to force IE to enumerate certain properties that it wrongly thinks shouldn't be enumerable: - https://developer.mozilla.org/en/ECMAScript_DontEnum_attribute#JScript_DontEnum_Bug - http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation

58ce26ddee9c5cc583f031eeb1ed36aea797bdca 09-May-2011 Ryan Grove <ryan@wonko.com>

Use native Object.create() if available; safer hasOwnProperty() check in owns(). When Object.create exists and neither MooTools or Prototype are on the page, we wrap the native Object.create. Wrapping instead of aliasing allows us to discard the second argument (properties) to Object.create, which we currently don't support in our non-native fallback implementation. This will ensure consistent API behavior until we add a safe fallback. Also modified owns() to use Object.prototype.hasOwnProperty() instead of relying on hasOwnProperty() on the passed object, since it may have been overridden.

458ca79ae0e4fa1eb1a2a3c6f67401a191d025e4 14-Dec-2010 Adam Moore <adamoore@yahoo-inc.com>

Reverted detection of native Object static methods because it picks up broken implementations of these functions in MooTools and Prototype.

13a50a8c4ecfe16d42abb7605f9451f76e02dc42 08-Oct-2010 Adam Moore <adamoore@yahoo-inc.com>

Uses native Object.keys/values/size when available

173310d032abe522e8645dd148cc28591cd128ea 08-Oct-2010 Adam Moore <adamoore@yahoo-inc.com>

Y.Object() optimization -- uses cached throwaway function and will use native Object.create() if available.

02b581ebfa9969c32cac8cd44ebe35e0e47f00ce 06-Oct-2010 Adam Moore <adamoore@yahoo-inc.com>

doc tweak [fixes #2529383]. debug code removal.

60de33a6560b784a96e41ca3998bfff78645e7cc 04-Oct-2010 Adam Moore <adamoore@yahoo-inc.com>

doc tweak [fixes #2529383]. debug code removal.

0bc189b2acbd7c4b5af63eded0c4289e224676b7 27-Sep-2010 Adam Moore <adamoore@yahoo-inc.com>

doc/lint cleanup

/yui3/build/event/event-delegate-min.js /yui3/build/event/event-focus-min.js /yui3/build/event/event-min.js /yui3/build/yui/features-debug.js /yui3/build/yui/features-min.js /yui3/build/yui/features.js /yui3/build/yui/get-debug.js /yui3/build/yui/get-min.js /yui3/build/yui/get.js /yui3/build/yui/rls-debug.js /yui3/build/yui/rls.js /yui3/build/yui/yui-base-debug.js /yui3/build/yui/yui-base-min.js /yui3/build/yui/yui-base.js /yui3/build/yui/yui-debug.js /yui3/build/yui/yui-later-debug.js /yui3/build/yui/yui-later-min.js /yui3/build/yui/yui-later.js /yui3/build/yui/yui-log-debug.js /yui3/build/yui/yui-log-min.js /yui3/build/yui/yui-log.js /yui3/build/yui/yui-min.js /yui3/build/yui/yui-throttle-debug.js /yui3/build/yui/yui-throttle-min.js /yui3/build/yui/yui-throttle.js /yui3/build/yui/yui.js features.js get.js queue-base.js rls.js yui-array.js yui-core.js yui-lang.js yui-later.js yui-log.js yui-object.js yui-throttle.js yui.js
b39897a381c2203466da5568bfd2862a54a81311 15-Sep-2010 Adam Moore <adamoore@yahoo-inc.com>

lint/doc cleanup

/yui3/build/loader/loader-base-debug.js /yui3/build/loader/loader-base-min.js /yui3/build/loader/loader-base.js /yui3/build/loader/loader-debug.js /yui3/build/loader/loader-min.js /yui3/build/loader/loader-rollup-debug.js /yui3/build/loader/loader-rollup-min.js /yui3/build/loader/loader-rollup.js /yui3/build/loader/loader-yui3-min.js /yui3/build/loader/loader.js /yui3/build/yui/features-debug.js /yui3/build/yui/features.js /yui3/build/yui/get-debug.js /yui3/build/yui/get.js /yui3/build/yui/intl-base-debug.js /yui3/build/yui/intl-base.js /yui3/build/yui/rls-debug.js /yui3/build/yui/rls.js /yui3/build/yui/yui-base-debug.js /yui3/build/yui/yui-base-min.js /yui3/build/yui/yui-base.js /yui3/build/yui/yui-debug.js /yui3/build/yui/yui-later-debug.js /yui3/build/yui/yui-later.js /yui3/build/yui/yui-log-debug.js /yui3/build/yui/yui-log.js /yui3/build/yui/yui-min.js /yui3/build/yui/yui-throttle-debug.js /yui3/build/yui/yui-throttle.js /yui3/build/yui/yui.js /yui3/sandbox/loader/2in3.html /yui3/sandbox/loader/2in3_datatable.html /yui3/sandbox/loader/2in3_rte.html /yui3/sandbox/loader/load.html /yui3/src/loader/js/loader.js /yui3/src/loader/js/meta.js /yui3/src/loader/js/rollup.js _module.js features.js get.js intl-base.js queue-base.js rls.js yui-array.js yui-core.js yui-lang.js yui-later.js yui-log.js yui-object.js yui-throttle.js yui-ua.js yui.js
7cd8fe832d4f91bed468c7498ff957c446f90aaa 25-Aug-2010 Adam Moore <adamoore@yahoo-inc.com>

Restored the documentation for Y.Object.some()

2242f4639156bbafd23f9d35efcc408198dc0e61 25-Jun-2010 Adam Moore <adamoore@yahoo-inc.com>

Added errorFn config for monitoring errors routed through Y.error. attach and use callback errors are routed through Y.error.

8c3fae1cf2a8dfa82c53922a6f99ab7b991b959c 18-May-2010 Adam Moore <adamoore@yahoo-inc.com>

Added Object.isEmpty [bug #2528903].

2e3359c809b56e9d1c663465eaf85d1a4c03bf4c 03-May-2010 Adam Moore <adamoore@yahoo-inc.com>

fixed typo [fixes bz3624035].

c74cf2305e301535acc8a5d42be60e93dcbd97da 30-Apr-2010 Adam Moore <adamoore@yahoo-inc.com>

added module version map. shadowing the yui prototype

b9f576e4a859f38cf945d867cf23fdbb84347564 22-Feb-2010 Adam Moore <adamoore@yahoo-inc.com>

docs/cleanup

c7eb563867fa29409073f3b495a067d9afa00006 13-Jan-2010 Adam Moore <adamoore@yahoo-inc.com>

'owns' tests for the hasOwnProperty method

489c0c8e2523f1bcd1acee1173c6d85f6a7edd6a 06-Jan-2010 Adam Moore <adamoore@yahoo-inc.com>

Y.Object cleanup

16bec62f211cecacdbbc2cb4632f079ef8c7f936 06-Jan-2010 Adam Moore <adamoore@yahoo-inc.com>

leaving in owns as an alias for hasKey

4390434761f176b0f8d7a71c00a6e0141aa1752c 06-Jan-2010 Adam Moore <adamoore@yahoo-inc.com>

moved hasOwnProperty check so that Y.Object.size works right when some messes around with Object.prototype [fixes #2528467].

0dca577a07715960da42d47787eecc25b285182f 06-Nov-2009 Adam Moore <adamoore@yahoo-inc.com>

getValue returns undefined if source isn't an object [fixes #2528347].

e0a1d83ad86620d8fd4e2bfa3c4ec5c0944a002a 06-Oct-2009 Adam Moore <adamoore@yahoo-inc.com>

Added Object.some(), Y.some()

23209f57fce338501bc1dc828a991d103732b92f 18-Sep-2009 Adam Moore <adamoore@yahoo-inc.com>

Any given object is only cloned once. DOM element attributes are not cloned. [bug #2528250].

efa57736d44cf446f1661497a8645bd388b493fb 26-Aug-2009 Adam Moore <adamoore@yahoo-inc.com>

API update for each/some methods [fixes #2528213].

2c5ce90c334a2d0f18474e85c93b424b6ec9daaa 13-Aug-2009 Adam Moore <adamoore@yahoo-inc.com>

queue-base is now part of yui-base. queue-run and queue-promote are independent modules.

/yui3/build/loader/loader-debug.js /yui3/build/loader/loader-min.js /yui3/build/loader/loader.js /yui3/build/queue-promote/queue-promote-debug.js /yui3/build/queue-promote/queue-promote-min.js /yui3/build/queue-promote/queue-promote.js /yui3/build/queue-run/queue-run-debug.js /yui3/build/queue-run/queue-run-min.js /yui3/build/queue-run/queue-run.js /yui3/build/yui/yui-base-debug.js /yui3/build/yui/yui-base-min.js /yui3/build/yui/yui-base.js /yui3/build/yui/yui-debug.js /yui3/build/yui/yui-min.js /yui3/build/yui/yui.js /yui3/sandbox/yui/dps+wireless.pdf /yui3/sandbox/yui/log.html /yui3/src/loader/js/loader.js /yui3/src/queue-promote/README /yui3/src/queue-promote/build.properties /yui3/src/queue-promote/build.xml /yui3/src/queue-promote/js/queue-promote.js /yui3/src/queue-promote/tests/example.html /yui3/src/queue-promote/tests/io_success.txt /yui3/src/queue-promote/tests/io_timeout.php /yui3/src/queue-promote/tests/queue.html /yui3/src/queue-run/README /yui3/src/queue-run/build.properties /yui3/src/queue-run/build.xml /yui3/src/queue-run/js/queue-run.js /yui3/src/queue-run/tests/example.html /yui3/src/queue-run/tests/io_success.txt /yui3/src/queue-run/tests/io_timeout.php /yui3/src/queue-run/tests/queue.html /yui3/src/queue/base.properties /yui3/src/queue/base.xml /yui3/src/queue/build.properties /yui3/src/queue/promote.xml /yui3/src/yui/README /yui3/src/yui/build.properties _module.js queue-base.js yui-array.js yui-core.js yui-init.js yui-lang.js yui-object.js yui-ua.js yui.js /yui3/src/yui/yui-base.properties
4778ff543a041ac356d6e661cc9b66c3fafa2092 12-Aug-2009 Adam Moore <adamoore@yahoo-inc.com>

API submodule breakdown

87d6b0a14cce52c4faa4b78fc9878eb553dab0d5 17-Jun-2009 Adam Moore <adamoore@yahoo-inc.com>

YUI API update [fixes #2526015]

9fb523cf517ad4d6a53ae9f461d672cba63835d2 04-May-2009 Adam Moore <adamoore@yahoo-inc.com>

new drag and drop metadata

91ff24e65531ce8bf171340d9384182f8c168af3 20-Apr-2009 Adam Moore <adamoore@yahoo-inc.com>

event facade prototype properties are protected when mixing in fire payload. fixes bug #2527852

3395e5fc071521d4e6b258ef4c7c0ef38601b94e 01-Apr-2009 Adam Moore <adamoore@yahoo-inc.com>

Added Object.getValue Object.setValue [ fixes bug #2526054 ]

87b084086b5937585acc7e091b2f1951e94d9145 18-Mar-2009 Adam Moore <adamoore@yahoo-inc.com>

node-event-simulate moved from submodules to plugins

d4dbc3afb5bb9cfd13490b358dc37bf951104ca7 26-Feb-2009 Adam Moore <adamoore@yahoo-inc.com>

Added to Object: values(), hasKey(), hasValue(), size() [fixes #2526012]

ba2701ee03e94104edf19911ee0989f8cee11088 06-Feb-2009 Adam Moore <adamoore@yahoo-inc.com>

refactor

c4e6d94ea429e473a6732b6eb5e0fc980e822881 04-Feb-2009 Adam Moore <adamoore@yahoo-inc.com>

Added closures to prevent local variable collisions

1b298c6f0ef597aa4ab0b8bcb25430b6c9a87749 14-Jan-2009 Adam Moore <adamoore@yahoo-inc.com>

yui reorg, updated build and organization, get and loader source moved to yui src dir

/yui3/build/get/get-debug.js /yui3/build/get/get.js /yui3/build/yui-base/yui-base-debug.js /yui3/build/yui-base/yui-base-min.js /yui3/build/yui-base/yui-base.js /yui3/build/yui/yui-debug.js /yui3/build/yui/yui-min.js /yui3/build/yui/yui.js /yui3/sandbox/yui/2 /yui3/sandbox/yui/assets/get.php /yui3/sandbox/yui/assets/post.php /yui3/sandbox/yui/assets/sync.php /yui3/sandbox/yui/assets/weather.php /yui3/sandbox/yui/augment2.html /yui3/sandbox/yui/bubbledd.html /yui3/sandbox/yui/ce.html /yui3/sandbox/yui/clone.html /yui3/sandbox/yui/dd.html /yui3/sandbox/yui/do.html /yui3/sandbox/yui/dom.html /yui3/sandbox/yui/each.html /yui3/sandbox/yui/event-compat.html /yui3/sandbox/yui/get.html /yui3/sandbox/yui/halt.html /yui3/sandbox/yui/load.html.orig /yui3/sandbox/yui/onavail.html /yui3/sandbox/yui/profiler.html /yui3/sandbox/yui/state.html /yui3/sandbox/yui/ua.html /yui3/sandbox/yui/unsubscribe.html /yui3/sandbox/yui/use.html /yui3/sandbox/yui/xhr.html /yui3/sandbox/yui/yui.html /yui3/src/get/README /yui3/src/loader/README /yui3/src/yui/README /yui3/src/yui/build.properties /yui3/src/yui/build.xml /yui3/src/yui/get.properties /yui3/src/yui/get.xml get.js loader.js yui-array.js yui-base.js yui-core.js yui-init.js yui-lang.js yui-later.js yui-log.js yui-object.js yui-ua.js yui.js /yui3/src/yui/loader.properties /yui3/src/yui/loader.xml /yui3/src/yui/yui-array.js /yui3/src/yui/yui-base.properties /yui3/src/yui/yui-base.xml /yui3/src/yui/yui-core.js /yui3/src/yui/yui-dump.js /yui3/src/yui/yui-init.js /yui3/src/yui/yui-lang.js /yui3/src/yui/yui-later.js /yui3/src/yui/yui-log.js /yui3/src/yui/yui-object.js /yui3/src/yui/yui-ua.js /yui3/util/yui/README /yui3/util/yui/build.properties /yui3/util/yui/build.xml /yui3/util/yui/build/yui-debug.js /yui3/util/yui/build/yui-min.js /yui3/util/yui/build/yui.js /yui3/util/yui/src/js/yui-array.js /yui3/util/yui/src/js/yui-compat.js /yui3/util/yui/src/js/yui-core.js /yui3/util/yui/src/js/yui-dump.js /yui3/util/yui/src/js/yui-init.js /yui3/util/yui/src/js/yui-lang.js /yui3/util/yui/src/js/yui-log.js /yui3/util/yui/src/js/yui-object.js /yui3/util/yui/src/js/yui-substitute.js /yui3/util/yui/src/js/yui-ua.js /yui3/util/yui/src/js/yui.js