Document need for async title-change

Better documentation for the fix in Ia32e76023c.

Change-Id: Ia272196248fc2acdec7041137e1d452ff70d0f06
This commit is contained in:
Wyatt Allen
2017-07-26 09:44:27 -07:00
parent 95a81e8328
commit e9bd3e286d

View File

@@ -468,6 +468,9 @@
};
this._path = value.path;
// NOTE: This may be called before attachment (e.g. while parentElement is
// null). Fire title-change in an async so that, if attachment to the DOM
// has been queued, the event can bubble up to the handler in gr-app.
this.async(() => {
this.fire('title-change',
{title: this._computeTruncatedFileDisplayName(this._path)});