(context)
| 85 | * @constructor |
| 86 | */ |
| 87 | var Canteen = function(context) { |
| 88 | var that = this; |
| 89 | |
| 90 | this._stack = []; |
| 91 | this.context = context; |
| 92 | |
| 93 | // add observable attributes |
| 94 | each(CONTEXT_2D_ATTRIBUTES, function(key, n) { |
| 95 | Object.defineProperty(that, key, { |
| 96 | get: function() { |
| 97 | return that.context[key]; |
| 98 | }, |
| 99 | set: function(val) { |
| 100 | that._pushAttr(key, val); |
| 101 | that.context[key] = val; |
| 102 | } |
| 103 | }); |
| 104 | }); |
| 105 | }; |
| 106 | |
| 107 | // Canteen methods |
| 108 | Canteen.prototype = { |
nothing calls this directly
no test coverage detected
searching dependent graphs…