Skip to content

Commit

Permalink
Merge pull request #804 from Mindelusions/timob-6289
Browse files Browse the repository at this point in the history
[TIMOB-6289] Removing old defineProperty shim
  • Loading branch information
cb1kenobi committed Dec 4, 2011
2 parents 74c0b5f + 7e2cc49 commit 260bc0a
Showing 1 changed file with 0 additions and 27 deletions.
27 changes: 0 additions & 27 deletions mobileweb/src/titanium.js
Expand Up @@ -347,33 +347,6 @@ function($window, args){
return val + (typeof val == 'number' ? 'px' : '');
};

if(typeof Object.defineProperty == 'undefined'){
// trying to emulate missing defineProperty
try{
Object.defineProperty = function(obj, prop, desc){
if(obj == null || prop == null){
throw "Object.defineProperty: object and property name are required parameters";
}
if(desc == null){
desc = {};
}

if(desc.set){
obj.__defineSetter__(prop, desc.set);
}
if(desc.get && desc.writable !== false){
obj.__defineGetter__(prop, desc.get);
}
};
} catch(e){
console.error(e);
}
}

Ti._5.parseLength = function(val){
return val + (typeof val == 'number' ? 'px' : '');
};

Ti._5.createUUID = function(){
/*!
Math.uuid.js (v1.4)
Expand Down

0 comments on commit 260bc0a

Please sign in to comment.