Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the polyfills; fix a type generation error. #5605

Open
wants to merge 7 commits into
base: legacy-undefined-noBatch-onDemand
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions gen-tsd.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"index.html"
],
"excludeIdentifiers": [
"ElementMixinPatchedBase",
"templatizedBase"
],
"removeReferences": [
Expand Down
9 changes: 7 additions & 2 deletions lib/mixins/element-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,13 @@ export const ElementMixin = dedupingMixin(base => {
// Optimizations for ShadyDOM's on-demand patching that pre-patches
// elements to work with ShadyDOM.
if (window.ShadyDOM && window.ShadyDOM.patchOnDemand) {
base = class extends base {};
ShadyDOM.patchElementProto(base.prototype);
// `ElementMixinPatchedBase` is explicitly ignored in `gen-tsd.json` so
// that it doesn't attempt to export a type for it: the type generator
// attempts to declare it as extending `base` but no type is generated for
// `base`.
class ElementMixinPatchedBase extends base {}
ShadyDOM.patchElementProto(ElementMixinPatchedBase.prototype);
base = ElementMixinPatchedBase;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion lib/utils/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export let lazyDefine =
*/
export const setLazyDefine = function(useLazyDefine) {
lazyDefine = useLazyDefine;
}
};

/**
* Setting to disable `dom-change` and `rendered-item-count` events from
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@polymer/gen-typescript-declarations": "^1.5.1",
"@polymer/iron-component-page": "^3.0.0-pre.12",
"@polymer/test-fixture": "^3.0.0-pre.12",
"@webcomponents/webcomponentsjs": "^2.2.10",
"@webcomponents/webcomponentsjs": "^2.4.0",
"babel-eslint": "^7.2.3",
"babel-preset-minify": "^0.2.0",
"del": "^3.0.0",
Expand Down Expand Up @@ -65,7 +65,7 @@
"type-detect": "1.0.0"
},
"dependencies": {
"@webcomponents/shadycss": "^1.9.1"
"@webcomponents/shadycss": "^1.9.3"
},
"files": [
"externs",
Expand Down
3 changes: 1 addition & 2 deletions test/unit/lazy-define.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@
<x-lazy-declarative></x-lazy-declarative>

<script type="module">
import { Polymer } from '../../polymer-legacy.js';
import { registrations } from '../../lib/utils/telemetry.js';

const getCtorFromTelemetry = (is) => {
Expand All @@ -76,7 +75,7 @@
return ctor;
}
}
}
};

suite('lazy-define', function() {

Expand Down