Skip to content

Commit 6a995a2

Browse files
author
Steven Orvell
committed
set isAttached constructor (for closure) but set to undefined so not picked up as proto property (avoids initial binding value)
1 parent 2c9ffac commit 6a995a2

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

closure.log

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,24 @@ Found : undefined
55
return window.Polymer._polymerFn(info);
66
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77

8+
/polymer.html_script_1.js:44: WARNING - The right side in the assignment is not a subtype of the left side.
9+
Expected : T
10+
Found : Function|null
11+
More details:
12+
The found type is a union that includes an unexpected type: null
13+
mixin = cachingMixin(mixin);
14+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
15+
816
/polymer.html_script_1.js:44: WARNING - Invalid type for parameter 1 of function cachingMixin.
917
Expected : Function|null
1018
Found : T
1119

12-
let cachedMixin = cachingMixin(mixin);
13-
^^^^^
20+
mixin = cachingMixin(mixin);
21+
^^^^^
22+
23+
/polymer.html_script_1.js:46: WARNING - Cannot create property __dedupeId on non-object type T.
24+
mixin.__dedupeId = ++dedupeId;
25+
^^^^^
1426

1527
/polymer.html_script_1.js:47: WARNING - Returned type does not match declared return type.
1628
Expected : T
@@ -693,7 +705,7 @@ Found : PolymerElement
693705
!(window.customElements.polyfillWrapFlushCallback);
694706
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
695707

696-
/polymer.html_script_22.js:855: WARNING - Function this.splice: called with 3 argument(s). Function requires at least 4 argument(s) and at most 4.
708+
/polymer.html_script_22.js:857: WARNING - Function this.splice: called with 3 argument(s). Function requires at least 4 argument(s) and at most 4.
697709
return this.splice(arrayOrPath, index, 1);
698710
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
699711

@@ -1366,4 +1378,4 @@ externs/closure-types.js:759: WARNING - property toggle on interface Polymer_Arr
13661378
Polymer_ArraySelectorMixin.prototype.toggle;
13671379
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13681380

1369-
0 error(s), 297 warning(s), 72.7% typed
1381+
0 error(s), 299 warning(s), 72.7% typed

lib/legacy/legacy-element-mixin.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,12 @@
6868
constructor() {
6969
super();
7070
this.root = this;
71-
this.created();
72-
this.isAttached = false;
71+
// initialize for closure but don't make false or a binding will see
72+
// this setting.
73+
this.isAttached = undefined;
7374
this.__boundListeners = null;
7475
this._debouncers = null;
76+
this.created();
7577
}
7678

7779
/**

0 commit comments

Comments
 (0)