Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions karma-js.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,6 @@ module.exports = function(config) {
{pattern: 'packages/platform-browser/test/static_assets/**/*', included: false},
{pattern: 'packages/platform-browser/test/browser/static_assets/**/*', included: false},

// Serve polyfills necessary for testing the `elements` package.
{
pattern: 'node_modules/@webcomponents/custom-elements/**/*.js',
included: false,
watched: false,
},

'node_modules/reflect-metadata/Reflect.js',

'dist/legacy-test-bundle.spec.js',
Expand Down
2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@
"@types/systemjs": "0.19.32",
"@types/uuid": "^9.0.0",
"@types/yargs": "^17.0.3",
"@webcomponents/custom-elements": "^1.1.0",
"angular-1.5": "npm:[email protected]",
"angular-1.6": "npm:[email protected]",
"angular-1.7": "npm:[email protected]",
Expand All @@ -110,7 +109,6 @@
"convert-source-map": "^1.5.1",
"d3": "^7.0.0",
"diff": "^5.0.0",
"document-register-element": "^1.7.2",
"domino": "https://github.com/angular/domino.git#aa8de3486307f57a518b4b0d9e5e16d9fbd998d1",
"graceful-fs": "4.2.11",
"hammerjs": "~2.0.8",
Expand Down
5 changes: 0 additions & 5 deletions packages/elements/src/create-custom-element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,6 @@ export function createCustomElement<P>(
static readonly['observedAttributes'] = Object.keys(attributeToPropertyInputs);

protected override get ngElementStrategy(): NgElementStrategy {
// NOTE:
// Some polyfills (e.g. `document-register-element`) do not call the constructor, therefore
// it is not safe to set `ngElementStrategy` in the constructor and assume it will be
// available inside the methods.
//
// TODO(andrewseguin): Add e2e tests that cover cases where the constructor isn't called. For
// now this is tested using a Google internal test suite.
if (!this._ngElementStrategy) {
Expand Down
5 changes: 1 addition & 4 deletions packages/elements/test/create-custom-element_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ describe('createCustomElement', () => {
});

it('should work even if the constructor is not called (due to polyfill)', () => {
// Some polyfills (e.g. `document-register-element`) do not call the constructor of custom
// elements. Currently, all the constructor does is initialize the `injector` property. This
// Currently, all the constructor does is initialize the `injector` property. This
// test simulates not having called the constructor by "unsetting" the property.
//
// NOTE:
Expand Down Expand Up @@ -256,8 +255,6 @@ describe('createCustomElement', () => {
function createAndRegisterTestCustomElement(strategyFactory: NgElementStrategyFactory) {
const {selector, ElementCtor} = createTestCustomElement(strategyFactory);

// The `@webcomponents/custom-elements/src/native-shim.js` polyfill allows us to create
// new instances of the NgElement which extends HTMLElement, as long as we define it.
customElements.define(selector, ElementCtor);

return ElementCtor;
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4120,11 +4120,6 @@
"@webassemblyjs/ast" "1.11.6"
"@xtuc/long" "4.2.2"

"@webcomponents/custom-elements@^1.1.0":
version "1.6.0"
resolved "https://registry.yarnpkg.com/@webcomponents/custom-elements/-/custom-elements-1.6.0.tgz#5ecde1c332464ff00612f51874484b78395d504d"
integrity sha512-CqTpxOlUCPWRNUPZDxT5v2NnHXA4oox612iUGnmTUGQFhZ1Gkj8kirtl/2wcF6MqX7+PqqicZzOCBKKfIn0dww==

"@xmldom/xmldom@^0.8.0", "@xmldom/xmldom@^0.8.5":
version "0.8.7"
resolved "https://registry.yarnpkg.com/@xmldom/xmldom/-/xmldom-0.8.7.tgz#8b1e39c547013941974d83ad5e9cf5042071a9a0"
Expand Down Expand Up @@ -7217,11 +7212,6 @@ [email protected]:
esutils "^1.1.6"
isarray "0.0.1"

document-register-element@^1.7.2:
version "1.14.10"
resolved "https://registry.yarnpkg.com/document-register-element/-/document-register-element-1.14.10.tgz#a7bd025e6b73bd827fec2d8e90aba755e99387f5"
integrity sha512-w5UA37hEIrs+9pruo2yR5UD13c4UHDlkqqjt4qurnp7QsBI9b1IOi8WXUim+aCqKBsENX3Z/cso7XMOuwJH1Yw==

dom-serialize@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b"
Expand Down