can't use hasOwnProperty as much with defineProp'd properties. Use try/catch for now. Maybe switch to interface test later
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/099334fb Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/099334fb Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/099334fb Branch: refs/heads/develop Commit: 099334fb26f0e48ce0bd2ff264c6a235f0f71ee8 Parents: cac36ed Author: Alex Harui <[email protected]> Authored: Fri Apr 3 16:03:35 2015 -0700 Committer: Alex Harui <[email protected]> Committed: Fri Apr 3 16:03:35 2015 -0700 ---------------------------------------------------------------------- .../src/org/apache/flex/core/SimpleCSSValuesImpl.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/099334fb/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js ---------------------------------------------------------------------- diff --git a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js index 23c068d..97f020e 100644 --- a/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js +++ b/frameworks/js/FlexJS/src/org/apache/flex/core/SimpleCSSValuesImpl.js @@ -74,21 +74,15 @@ org_apache_flex_core_SimpleCSSValuesImpl.prototype.getValue = var cName; var selectorName; - if (typeof(thisObject.hasOwnProperty('style')) === 'function') - { + try { var style = thisObject.style; - if (style != null) - { - try { - value = style[valueName]; - } - catch (e) { - value = undefined; - } + if (style != null) { + value = style[valueName]; if (value !== undefined) return value; } } + catch(e) {}; if ('className' in thisObject) {
