private _writable method

inverse of readOnly
This commit is contained in:
Yotam Mann 2015-04-05 14:42:32 -04:00
parent c0de630442
commit 4be776955d

View file

@ -505,7 +505,7 @@ define(function(){
/** /**
* Make the property not writable. Internal use only. * Make the property not writable. Internal use only.
* @private * @private
* @param {string} property the property to make not writeable * @param {string} property the property to make not writable
*/ */
Tone.prototype._readOnly = function(property){ Tone.prototype._readOnly = function(property){
Object.defineProperty(this, property, { Object.defineProperty(this, property, {
@ -514,6 +514,17 @@ define(function(){
}); });
}; };
/**
* Make an attribute writeable. Interal use only.
* @private
* @param {string} property the property to make writable
*/
Tone.prototype._writable = function(property){
Object.defineProperty(this, property, {
writable: true,
});
};
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////
// GAIN CONVERSIONS // GAIN CONVERSIONS
/////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////