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

Unified Diff: third_party/polymer/components-chromium/paper-dialog/paper-dialog-extracted.js

Issue 592593002: Inline scripts were extracted from Polymer elements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/echo ""/echo/ Created 6 years, 3 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
Index: third_party/polymer/components-chromium/paper-dialog/paper-dialog-extracted.js
diff --git a/third_party/polymer/components-chromium/paper-dialog/paper-dialog-extracted.js b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-extracted.js
new file mode 100644
index 0000000000000000000000000000000000000000..e78c0d432114999fa5816660db1b8e7471f98f58
--- /dev/null
+++ b/third_party/polymer/components-chromium/paper-dialog/paper-dialog-extracted.js
@@ -0,0 +1,87 @@
+
+
+ Polymer('paper-dialog', {
+
+ /**
+ * Set opened to true to show the dialog and to false to hide it.
+ * A dialog may be made intially opened by setting its opened attribute.
+
+ * @attribute opened
+ * @type boolean
+ * @default false
+ */
+ opened: false,
+
+ /**
+ * If true, the dialog has a backdrop darkening the rest of the screen.
+ * The backdrop element is attached to the document body and may be styled
+ * with the class `core-overlay-backdrop`. When opened the `core-opened`
+ * class is applied.
+ *
+ * @attribute backdrop
+ * @type boolean
+ * @default false
+ */
+ backdrop: false,
+
+ /**
+ * If true, the dialog is guaranteed to display above page content.
+ *
+ * @attribute layered
+ * @type boolean
+ * @default false
+ */
+ layered: false,
+
+ /**
+ * By default a dialog will close automatically if the user
+ * taps outside it or presses the escape key. Disable this
+ * behavior by setting the `autoCloseDisabled` property to true.
+ * @attribute autoCloseDisabled
+ * @type boolean
+ * @default false
+ */
+ autoCloseDisabled: false,
+
+ /**
+ * This property specifies a selector matching elements that should
+ * close the dialog on tap.
+ *
+ * @attribute closeSelector
+ * @type string
+ * @default ""
+ */
+ closeSelector: '[dismissive],[affirmative]',
+
+ /**
+ * @attribute heading
+ * @type string
+ * @default ''
+ */
+ heading: '',
+
+ /**
+ * Set this property to the id of a <core-transition> element to specify
+ * the transition to use when opening/closing this dialog.
+ *
+ * @attribute transition
+ * @type string
+ * @default ''
+ */
+ transition: '',
+
+ /**
+ * Toggle the dialog's opened state.
+ * @method toggle
+ */
+ toggle: function() {
+ this.$.overlay.toggle();
+ },
+
+ headingChanged: function() {
+ this.setAttribute('aria-label', this.heading);
+ }
+
+ });
+
+

Powered by Google App Engine
This is Rietveld 408576698