question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CustomElements spec mismatch

See original GitHub issue

I’m having fun, built it myself (no luck with the DMG) and trying out demos. Looking forward to getting my custom WebGL stuff running (https://github.com/trusktr/infamous)!

Here’s the basic demo I am trying to run:

https://s.codepen.io/trusktr/debug/293963ee1c01075e831990e55a67b818

(Here’s the editable version)

But it throws this error in the ExoKit console:

TypeError: el.setProtototypeOf is not a function
    at CustomElementRegistry.upgrade (/Users/trusktr/src/webmixedreality+exokit/src/core.js:250:8)
    at _window.document.traverse.el (/Users/trusktr/src/webmixedreality+exokit/src/core.js:212:14)
    at _recurse (/Users/trusktr/src/webmixedreality+exokit/src/DOM.js:1116:22)
    at _recurse (/Users/trusktr/src/webmixedreality+exokit/src/DOM.js:1122:28)
    at _recurse (/Users/trusktr/src/webmixedreality+exokit/src/DOM.js:1122:28)
    at _recurse (/Users/trusktr/src/webmixedreality+exokit/src/DOM.js:1122:28)
    at Document.traverse (/Users/trusktr/src/webmixedreality+exokit/src/DOM.js:1133:12)
    at CustomElementRegistry.define (/Users/trusktr/src/webmixedreality+exokit/src/core.js:210:27)
    at Function.define (https://unpkg.com/infamous@19.0.4/global.js:56872:32)
    at Module.useDefaultNames (https://unpkg.com/infamous@19.0.4/global.js:59787:74)
    at https://s.codepen.io/trusktr/debug/293963ee1c01075e831990e55a67b818:60:21
    at Object._runJavascript (/Users/trusktr/src/webmixedreality+exokit/src/utils.js:67:15)
    at Resource.ownerDocument.resources.addResource [as getCb] (/Users/trusktr/src/webmixedreality+exokit/src/DOM.js:1637:13)
    at Promise (/Users/trusktr/src/webmixedreality+exokit/src/core.js:101:12)
    at new Promise (<anonymous>)
    at Resource.get (/Users/trusktr/src/webmixedreality+exokit/src/core.js:100:12)
    at Resources.drain (/Users/trusktr/src/webmixedreality+exokit/src/core.js:179:16)
    at Promise (/Users/trusktr/src/webmixedreality+exokit/src/core.js:172:12)
    at new Promise (<anonymous>)
    at Resources.addResource (/Users/trusktr/src/webmixedreality+exokit/src/core.js:152:12)
    at HTMLScriptElement.runNow (/Users/trusktr/src/webmixedreality+exokit/src/DOM.js:1636:41)
    at HTMLScriptElement.<anonymous> (/Users/trusktr/src/webmixedreality+exokit/src/DOM.js:1653:21)
    at /Users/trusktr/src/webmixedreality+exokit/src/Document.js:120:17
    at _addRun (/Users/trusktr/src/webmixedreality+exokit/src/Document.js:134:7)
    at /Users/trusktr/src/webmixedreality+exokit/src/Document.js:127:11
    at process._tickCallback (internal/process/next_tick.js:68:7)

The callsite of my code, global.js line 56872, is this:

                customElements.define(name, this)

which is being called inside of a static method of my class, so this refers to the class constructor itself, and name is the element name.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
trusktrcommented, Nov 25, 2018

Hmmm, interesting, looks like something about lowclass isn’t working in ExoKit (works in regular browsers).

I’ll step through it soon to see what’s going on.

0reactions
trusktrcommented, Nov 26, 2018

By the way, thanks for making that quick fix. I’m looking forward to get make something awesome with this! 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

defineCustomElements does not work in Jest environment
The problem is, when I write unit tests for my Vue app, my-component is not defined. If you go to tests/unit/example.spec.js , I'm...
Read more >
Custom Elements - WHATWG Wiki
This page documents open technical issues with Custom Elements based on ... ES6-style classes (Spec/Chrome: mutating prototype) ...
Read more >
Re: Minimum viable custom elements - Mailing lists - W3C
In IRC we've been discussing how I don't think there's actually any (observable) mismatch with the rest of the platform if we are...
Read more >
Web Components 101: Vanilla JavaScript - CoderPad
They're widely utilized in HTML-spec tags, and most display custom elements should be able to utilize attributes to pass data from a parent ......
Read more >
Trusted Types - W3C on GitHub
This version: https://w3c.github.io/trusted-types/dist/spec/ ... be the result of executing Should sink type mismatch violation be blocked ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found