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

Unified Diff: dashboard/dashboard/elements/overlay-message-bar.html

Issue 1767183003: Sample of making global Polymer element. (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: add overlay-message-bar Created 4 years, 9 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 | « no previous file | dashboard/dashboard/elements/report-page.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/elements/overlay-message-bar.html
diff --git a/dashboard/dashboard/elements/overlay-message-bar.html b/dashboard/dashboard/elements/overlay-message-bar.html
new file mode 100644
index 0000000000000000000000000000000000000000..fcd61455d8d26abf0e388964003afa925b8d6d4c
--- /dev/null
+++ b/dashboard/dashboard/elements/overlay-message-bar.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<!--
+Copyright 2016 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.
+-->
+
+<polymer-element name="overlay-message-bar"
+ extends="overlay-message"
+ attributes="text autoCloseDisabled transition duration opened
+ maxWidth delay">
+
+ <script>
+ 'use strict';
+
+ (function() {
+ var globalMessageBar = null;
+
+ Polymer('overlay-message-bar', {
+ created: function() {
+ if (!globalMessageBar) {
+ globalMessageBar = this;
+ }
+ },
+
+ updateContent: function(content, config) {
+ globalMessageBar.super([content, config]);
+ },
+ });
+ })();
+ </script>
+</polymer-element>
« no previous file with comments | « no previous file | dashboard/dashboard/elements/report-page.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698