Chromium Code Reviews| Index: Source/core/html/HTMLBlinkElement.js |
| diff --git a/Source/core/html/HTMLBlinkElement.js b/Source/core/html/HTMLBlinkElement.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b0af320254836bf0dbd601faa0f97f8620ff1e8f |
| --- /dev/null |
| +++ b/Source/core/html/HTMLBlinkElement.js |
| @@ -0,0 +1,19 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +'use strict'; |
| + |
| +installClass('HTMLBlinkElement', function(global, HTMLBlinkElementPrototype) { |
| + HTMLBlinkElementPrototype.attachedCallback = function() { |
| + this.displayed_ = 1; |
| + this.timer_ = setInterval(function() { |
| + this.setAttribute("style", this.displayed_ ? "display:inline" : "display:none"); |
|
abarth-chromium
2014/08/01 21:42:45
I think you're supposed to twiddle between visibil
haraken
2014/08/01 21:48:03
Done.
|
| + this.displayed_ ^= 1; |
| + }.bind(this), 500); |
| + }; |
| + |
| + HTMLBlinkElementPrototype.detachedCallback = function() { |
| + clearInterval(this.timer_); |
| + }; |
| +}); |