Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(482)

Unified Diff: Source/core/html/HTMLBlinkElement.js

Issue 419213002: [Not for review] Implement a <blink> tag in Blink-in-JS Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLBlinkElement.idl ('k') | Source/core/html/HTMLTagNames.in » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_);
+ };
+});
« no previous file with comments | « Source/core/html/HTMLBlinkElement.idl ('k') | Source/core/html/HTMLTagNames.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698