| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. | 2 * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. |
| 3 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt | 3 * This code may only be used under the BSD style license found at http://polyme
r.github.io/LICENSE.txt |
| 4 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt | 4 * The complete set of authors may be found at http://polymer.github.io/AUTHORS.
txt |
| 5 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt | 5 * The complete set of contributors may be found at http://polymer.github.io/CON
TRIBUTORS.txt |
| 6 * Code distributed by Google as part of the polymer project is also | 6 * Code distributed by Google as part of the polymer project is also |
| 7 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt | 7 * subject to an additional IP rights grant found at http://polymer.github.io/PA
TENTS.txt |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 window.Platform = window.Platform || {}; | 10 window.Platform = window.Platform || {}; |
| (...skipping 2001 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2012 try { | 2012 try { |
| 2013 return Object.getOwnPropertyDescriptor(source, name); | 2013 return Object.getOwnPropertyDescriptor(source, name); |
| 2014 } catch (ex) { | 2014 } catch (ex) { |
| 2015 // JSC and V8 both use data properties instead of accessors which can | 2015 // JSC and V8 both use data properties instead of accessors which can |
| 2016 // cause getting the property desciptor to throw an exception. | 2016 // cause getting the property desciptor to throw an exception. |
| 2017 // https://bugs.webkit.org/show_bug.cgi?id=49739 | 2017 // https://bugs.webkit.org/show_bug.cgi?id=49739 |
| 2018 return dummyDescriptor; | 2018 return dummyDescriptor; |
| 2019 } | 2019 } |
| 2020 } | 2020 } |
| 2021 | 2021 |
| 2022 // Safari 8 exposes WebIDL attributes as an invalid accessor property. Its |
| 2023 // descriptor has {get: undefined, set: undefined}. We therefore ignore the |
| 2024 // shape of the descriptor and make all properties read-write. |
| 2025 // https://bugs.webkit.org/show_bug.cgi?id=49739 |
| 2026 var isBrokenSafari = function() { |
| 2027 var descr = Object.getOwnPropertyDescriptor(Node.prototype, 'nodeType'); |
| 2028 return !!descr && 'set' in descr; |
| 2029 }(); |
| 2030 |
| 2022 function installProperty(source, target, allowMethod, opt_blacklist) { | 2031 function installProperty(source, target, allowMethod, opt_blacklist) { |
| 2023 var names = getOwnPropertyNames(source); | 2032 var names = getOwnPropertyNames(source); |
| 2024 for (var i = 0; i < names.length; i++) { | 2033 for (var i = 0; i < names.length; i++) { |
| 2025 var name = names[i]; | 2034 var name = names[i]; |
| 2026 if (name === 'polymerBlackList_') | 2035 if (name === 'polymerBlackList_') |
| 2027 continue; | 2036 continue; |
| 2028 | 2037 |
| 2029 if (name in target) | 2038 if (name in target) |
| 2030 continue; | 2039 continue; |
| 2031 | 2040 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 2042 target[name] = getMethod(name); | 2051 target[name] = getMethod(name); |
| 2043 continue; | 2052 continue; |
| 2044 } | 2053 } |
| 2045 | 2054 |
| 2046 var isEvent = isEventHandlerName(name); | 2055 var isEvent = isEventHandlerName(name); |
| 2047 if (isEvent) | 2056 if (isEvent) |
| 2048 getter = scope.getEventHandlerGetter(name); | 2057 getter = scope.getEventHandlerGetter(name); |
| 2049 else | 2058 else |
| 2050 getter = getGetter(name); | 2059 getter = getGetter(name); |
| 2051 | 2060 |
| 2052 if (descriptor.writable || descriptor.set) { | 2061 if (descriptor.writable || descriptor.set || isBrokenSafari) { |
| 2053 if (isEvent) | 2062 if (isEvent) |
| 2054 setter = scope.getEventHandlerSetter(name); | 2063 setter = scope.getEventHandlerSetter(name); |
| 2055 else | 2064 else |
| 2056 setter = getSetter(name); | 2065 setter = getSetter(name); |
| 2057 } | 2066 } |
| 2058 | 2067 |
| 2059 defineProperty(target, name, { | 2068 defineProperty(target, name, { |
| 2060 get: getter, | 2069 get: getter, |
| 2061 set: setter, | 2070 set: setter, |
| 2062 configurable: descriptor.configurable, | 2071 configurable: descriptor.configurable, |
| (...skipping 10194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 12257 // exports | 12266 // exports |
| 12258 | 12267 |
| 12259 scope.marshal = marshal; | 12268 scope.marshal = marshal; |
| 12260 // `module` confuses commonjs detectors | 12269 // `module` confuses commonjs detectors |
| 12261 scope.modularize = module; | 12270 scope.modularize = module; |
| 12262 scope.using = using; | 12271 scope.using = using; |
| 12263 | 12272 |
| 12264 })(window); | 12273 })(window); |
| 12265 | 12274 |
| 12266 //# sourceMappingURL=platform.concat.js.map | 12275 //# sourceMappingURL=platform.concat.js.map |
| OLD | NEW |