webcomponents / webcomponents/polyfills

window.__shady_native_addEventListener is not a function in versions of Chrome and Firefox

Open
#279 10 comments 3 reactions 0 assignees View on GitHub
Package: shadydom Type: Bug
Dominant language
HTML
Stars
1.2k
Forks
168
PR merge metrics
No merged PRs in 30d

Description

### Description
Simply trying to load the webcomponents polyfills in Firefox 30 throws this error:
TypeError: window.__shady_native_addEventListener is not a function

Since windows.EventTarget exists in FF30, this [if-check](https://github.com/webcomponents/polyfills/blob/fd0ebcdbb6ea330b754f04c2c9cf91aba15b2d17/packages/shadydom/src/patch-native.js#L109) results in __shady_native_addEventListener not getting set on window. However, there are attempts to call it subsequently.

#### Live Demo
https://jsbin.com/gajugarere/1/edit?html,console,output

#### Steps to Reproduce

1. Try to load webcomponents polyfills in Firefox 30.

#### Expected Results

Polyfills load without error.

#### Actual Results

Error is thrown and polyfills fail.

### Browsers Affected

- [x] Chrome
- [x] Firefox
- [ ] Edge
- [ ] Safari 9
- [ ] Safari 8
- [ ] IE 11

### Versions
- webcomponents: v2.4.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.