Skip to content

Commit

Permalink
Add JS compiler bug link
Browse files Browse the repository at this point in the history
  • Loading branch information
aomarks committed Jul 15, 2019
1 parent 1222a65 commit 69afb2a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/lib/updating-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ type UpdateState = typeof STATE_HAS_UPDATED|typeof STATE_UPDATE_REQUESTED|

/**
* The Closure JS Compiler doesn't currently have good support for static
* property semantics where "this" is dynamic, so we use this hack to bypass
* any rewriting by the compiler.
* property semantics where "this" is dynamic (e.g.
* https://github.com/google/closure-compiler/issues/3177 and others) so we use
* this hack to bypass any rewriting by the compiler.
*/
const finalized = 'finalized';

Expand All @@ -220,7 +221,7 @@ export abstract class UpdatingElement extends HTMLElement {
/**
* Marks class as having finished creating properties.
*/
protected static [finalized] = true;
protected static[finalized] = true;

/**
* Memoized list of all class properties, including any superclass properties.
Expand Down
4 changes: 2 additions & 2 deletions src/lit-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export class LitElement extends UpdatingElement {
* Note this property name is a string to prevent breaking Closure JS Compiler
* optimizations. See updating-element.ts for more information.
*/
protected static ['finalized'] = true;
protected static['finalized'] = true;
/**
* Render method used to render the lit-html TemplateResult to the element's
* DOM.
Expand All @@ -89,7 +89,7 @@ export class LitElement extends UpdatingElement {
/** @nocollapse */
protected static finalize() {
// The Closure JS Compiler does not always preserve the correct "this"
// when calling static super methods, so explicitly bind here.
// when calling static super methods (b/137460243), so explicitly bind.
super.finalize.apply(this);
// Prepare styling that is stamped at first render time. Styling
// is built from user provided `styles` or is inherited from the superclass.
Expand Down

0 comments on commit 69afb2a

Please sign in to comment.