(key)
| 535 | }); |
| 536 | }; |
| 537 | var addInstanceExtraProperty = function (key) { |
| 538 | if (!instance.hasOwnProperty("extra")) { |
| 539 | instance.extra = {}; |
| 540 | } |
| 541 | Object.defineProperty(instance.extra, key, { |
| 542 | get: function () { |
| 543 | return opts.data[key]; |
| 544 | }, |
| 545 | set: function (val) { |
| 546 | setInstanceProperty(key, val); |
| 547 | |
| 548 | /*if (opts.autoSave) { |
| 549 | saveInstanceProperty(key, val); |
| 550 | }*/if (opts.extrachanges.indexOf(key) === -1) { |
| 551 | opts.extrachanges.push(key); |
| 552 | } |
| 553 | }, |
| 554 | enumerable: true |
| 555 | }); |
| 556 | }; |
| 557 | |
| 558 | var i, k; |
| 559 |
no test coverage detected