diff --git a/web-animation.js b/web-animation.js index e9e23723..fb375511 100644 --- a/web-animation.js +++ b/web-animation.js @@ -2074,12 +2074,14 @@ var timeZero = useHighResTime ? 0 : Date.now(); // Massive hack to allow things to be added to the parent group and start // playing. Maybe this is right though? -DEFAULT_GROUP.__defineGetter__('iterationTime', function() { - if (!isDefinedAndNotNull(timeNow)) { - timeNow = useHighResTime ? performance.now() : Date.now() - timeZero; - setTimeout(function() { timeNow = undefined; }, 0); +Object.defineProperty(DEFAULT_GROUP, 'iterationTime', { + get: function() { + if (!isDefinedAndNotNull(timeNow)) { + timeNow = useHighResTime ? performance.now() : Date.now() - timeZero; + setTimeout(function() { timeNow = undefined; }, 0); + } + return timeNow / 1000; } - return timeNow / 1000; }); var ticker = function(frameTime) {