Comments (9)
@jab, the specific error Object doesn't support property or method 'call'
isn't unique to the particular issue fixed here in v1.0.3, it's just what IE says when you try to reference a property of an object and call it but that function doesn't exist. (For example, you can run ({}).noSuchFunction(1, 2, 3)
in IE's console and it will throw an error with the message Object doesn't support property or method 'noSuchFunction'
.)
I ran your site and it throws here, inside webcomponents-lite.js:
Which looks like it corresponds with this line in ShadyDOM:
https://github.com/webcomponents/shadydom/blob/3d94a2e4cb66563a043e9fc7ca2219e0ff9d8a3e/src/patch-events.js#L360
So the thing it's trying to call the call
method on isn't a function (and doesn't have a handleEvent
method). I haven't dug any deeper yet, but I'd double check that you're passing the right kind of thing to the unload
listener you're setting.
from custom-elements.
Hi, I've got a PR that's been out for a while that fixes this but it hasn't been reviewed unfortunately. :/ @KamiQuasi is right: the problem is that IE11 doesn't support remove
but the polyfill adds this method unconditionally. Though, if you're using a polyfill for remove
, you can put it in first and the custom elements polyfill should end up using the polyfilled remove
.
from custom-elements.
OK, found the likely culprit. We were still using a 3.x preview of vaadin-grid. Upgraded to released version 3.0.2, and now it works OK in IE11/edge
from custom-elements.
May not be the exact same issue, but generates the error at will upon press of the "Remove" button (TypeScript transpiled with "none" modules and targeting es5; polyfill doesn't seem to work quite right in jsbin for IE, but the button still throws the same message):
https://jsbin.com/weregew/edit?html,js,console,output
The issue I'm having appears to be centered around this line (https://github.com/webcomponents/custom-elements/blob/master/src/Patch/Interface/ChildNode.js#L104) where, at least in the transpiled and minified code, the remove function does not exist at that point for IE11. IE11 does get polyfilled for window.Element.prototype.remove, but it doesn't seem like that is being referenced at that point in the code. The easiest way to recreate it is just to create a dummy element in script, transpile to es5, then on the page where you have the element run document.querySelector('dummy-element').remove()
from custom-elements.
I'm having the exact same issue. Used the polyfill from the MDN and the exception seems to be gone.
from custom-elements.
This should be fixed as of tag v1.0.3
, let me know if it's not!
from custom-elements.
@bicknellr I just tested a fresh build on a test site that included webcomponentsjs 1.0.14 in IE11, and am seeing this error message. Here's a screenshot:
Could I still be getting that if this were fixed, or could this be something else? I see webcomponents/webcomponentsjs#830 refers to the same error and is still open, so if that's a separate issue that I'm hitting, I'll track it there instead. (Btw the test site is at https://uproxy.github.io/uproxy.org/ in case it's helpful.)
from custom-elements.
@bicknellr I'm seeing the exact same error, also on the unload listener. I don't use this listener myself though, so there's probably some other element that does. I tried searching, but haven't found the root cause.
from custom-elements.
@srijken BTW, window.onunload
is equal to null
by default for me, at least in Chrome.
How to check:
- open
about:blank
- open console (F12 in IE)
- type
window.onunload
from custom-elements.
Related Issues (20)
- Node.append() should be monkeypatched by custom-elements/src/Patch/Node.js HOT 2
- Use webcomponents-loader in webpack HOT 2
- Native ES6 classes do not work when the native-shim is in use. HOT 7
- Transpiling CEs to ES5 and loading them correctly HOT 1
- Object doesn't support property or method ... HOT 1
- Add support for `customElements.upgrade`.
- Constructor called twice in some cases HOT 2
- Duplicate declaration exception differs from original HOT 1
- CE polyfill is incompatible with babelHelpers class adapter HOT 4
- Modifying DOM in connectedCallback leads to wrong callback order for children. HOT 1
- No callbacks when using range.insertNode HOT 1
- Compiled version of custom-elements.min.js in latest version 1.1.2 does not exist in npm HOT 2
- Question: why use __ce_shadowRoot instead of shadowRoot HOT 7
- Error compiling m-datepicker HOT 1
- IE11/Edge errors SCRIPT28 and SCRIPT2343 (es5) HOT 2
- appreciate your feedback for custom element diagram HOT 7
- Can this polyfill be considered dead? HOT 2
- A browser extension overwrites HTMLElement.prototype.appendChild HOT 1
- Setting textContent to `null` or `undefined` incorrectly creates text with the string `null` or `undefined`
- Some errors thrown during define are squelched
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from custom-elements.