Commit c928f70f authored by Noel Gordon's avatar Noel Gordon Committed by Commit Bot

[fileapp] Remove FilesMessage createElement_ member

Create the element content the way we do with the <bread-crumb> custom
element (which came latter).

No change in behavior: covered by FilesMessage unittest.

Bug: code-health
Change-Id: Id568aa6b5644a712db88ba5f4fa8d3d13f323b06
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2500685
Commit-Queue: Noel Gordon <noel@chromium.org>
Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
Auto-Submit: Noel Gordon <noel@chromium.org>
Reviewed-by: default avatarLuciano Pacheco <lucmult@chromium.org>
Cr-Commit-Position: refs/heads/master@{#821070}
parent dee733db
......@@ -74,8 +74,10 @@ const filesMessageTemplate = `
*/
class FilesMessage extends HTMLElement {
constructor() {
super();
this.createElement_();
/**
* Create element content.
*/
super().attachShadow({mode: 'open'}).innerHTML = filesMessageTemplate;
/**
* FilesMessage visual signals user callback.
......@@ -84,14 +86,6 @@ class FilesMessage extends HTMLElement {
this.signal_ = console.log;
}
/**
* Creates FilesMessage element.
* @private
*/
createElement_() {
this.attachShadow({mode: 'open'}).innerHTML = filesMessageTemplate;
}
/**
* Sets |this| properties (even its HTMLElement properties) from an object.
* @param {!Object} object Settable property name/value pairs.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment