webcomponents / polyfills

Web Components Polyfills
BSD 3-Clause "New" or "Revised" License
1.13k stars 165 forks source link

"Cannot set property once" error when used with zone.js #531

Open vigie opened 1 year ago

vigie commented 1 year ago

Description

When used with zone.js (all Angular applications), following error is thrown:

zone.js:1953 Uncaught TypeError: Cannot set property once of [object Object] which has only a getter
    at HTMLDivElement.addEventListener (zone.js:1953:42)
    at webcomponents-bundle.js:98:596
    at webcomponents-bundle.js:98:767
    at webcomponents-bundle.js:382:176

Steps to reproduce

Generate an Angular app and include this polyfill. Start the app.

I've verified that adding a once setter removes the error.

Expected behavior

Should not throw error

Actual behavior

Above error is thrown

Version

This was introduced in version 2.7 by this PR https://github.com/webcomponents/polyfills/pull/469

Browsers affected

Only tested on Chrome

mohit-sahore commented 1 year ago

I am facing the same issue for the last 5 days. Any update on this?

inspector-code commented 1 year ago

The same problem. Are there any solutions?

tappmax commented 1 year ago

I have the same issue. Is this the problem here? https://github.com/webcomponents/polyfills/blob/master/packages/webcomponentsjs/ts_src/platform/event-listener-options.ts#L26

tappmax commented 1 year ago

Unfortunately, my current solution to this is to use the previous minor version.

marlberm2014 commented 1 year ago

@tappmax downgrading to 2.6 also works for me. Hopefully this is fix in the next releases.

mme-private commented 1 year ago

Can confirm, problem is still actual.

iamnaumovnikita commented 1 year ago

Still actual

Volftsun commented 6 months ago

Same here, the bug still actual