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..4cb973ecfa420c08d3945e8bc91306c31974c6e7 |
--- /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_ ? "visibility:visible" : "visibility:hidden"); |
+ this.displayed_ ^= 1; |
+ }.bind(this), 500); |
+ }; |
+ |
+ HTMLBlinkElementPrototype.detachedCallback = function() { |
+ clearInterval(this.timer_); |
+ }; |
+}); |