Coder Social home page Coder Social logo

IE 11 error: Object doesn't support property or method 'call', File: webcomponents-lite.js, Line: 67, Column: 154 about custom-elements HOT 9 CLOSED

webcomponents avatar webcomponents commented on June 28, 2024 6
IE 11 error: Object doesn't support property or method 'call', File: webcomponents-lite.js, Line: 67, Column: 154

from custom-elements.

Comments (9)

bicknellr avatar bicknellr commented on June 28, 2024 4

@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:
screen shot 2017-10-03 at 11 36 16
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.

bicknellr avatar bicknellr commented on June 28, 2024 3

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.

srijken avatar srijken commented on June 28, 2024 1

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.

KamiQuasi avatar KamiQuasi commented on June 28, 2024

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.

noamichael avatar noamichael commented on June 28, 2024

I'm having the exact same issue. Used the polyfill from the MDN and the exception seems to be gone.

from custom-elements.

bicknellr avatar bicknellr commented on June 28, 2024

This should be fixed as of tag v1.0.3, let me know if it's not!

from custom-elements.

jab avatar jab commented on June 28, 2024

@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:
screen shot 2017-10-02 at 20 50 01
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.

srijken avatar srijken commented on June 28, 2024

@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.

web-padawan avatar web-padawan commented on June 28, 2024

@srijken BTW, window.onunload is equal to null by default for me, at least in Chrome.

How to check:

  1. open about:blank
  2. open console (F12 in IE)
  3. type window.onunload

from custom-elements.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.