Giter Club home page Giter Club logo

Comments (6)

notoriousb1t avatar notoriousb1t commented on May 31, 2024

I would guess based on that error that the code is using VDOM and that the new code which is checking for instanceof SVGPathElement fails due to the comparison being run on a virtual element.

I changed the code to check tagName === 'PATH' like the last version used and moved the version to 1.0.1. Please let me know if this helps. You may need to change the link to https://unpkg.com/browse/[email protected]/dist/polymorph.min.js to lock in the version (I am not sure how long unpkg caches for, so you may or may not need to do this).

Please let me know if this helps.

from polymorph.

fluxxus avatar fluxxus commented on May 31, 2024

@notoriousb1t I am afraid it is still not working. I've cleared cache, checked in console that I am using the latest 1.0.1 version, but no luck.

I am linking to this file https://unpkg.com/[email protected]/dist/polymorph.min.js

 Uncaught Error: Unsupported element  path
 at Z (polymorph.min.js:4)
 at polymorph.min.js:88
 at new tr (polymorph.min.js:88)
 at polymorph.min.js:89
 at Array.map (<anonymous>)
 at Object.r.interpolate (polymorph.min.js:89)

from polymorph.

notoriousb1t avatar notoriousb1t commented on May 31, 2024

Could you provide a link to the site that is not working? I am afraid I can't help any further without something to debug. The tagName of Element should return in full uppercase (which is what all browsers should be doing). The fact that it is in lowercase is a bit baffling.

The error is being thrown here: https://github.com/notoriousb1t/polymorph/blob/master/src/getPath.ts#L39.

from polymorph.

fluxxus avatar fluxxus commented on May 31, 2024

Sure thing. Here is one part of the code from that website isolated without anything else. Guess it is easier for you this way, without stuff that is not needed.

Link

from polymorph.

notoriousb1t avatar notoriousb1t commented on May 31, 2024

Okay, try `https://unpkg.com/[email protected]/dist/polymorph.min.js'. It turns out I wasn't entirely right about tagName. It is in uppercase for HTML elements, but SVG elements aren't HTML elements, so they can be lowercase. I changed to code to be incase-sensitive.

from polymorph.

fluxxus avatar fluxxus commented on May 31, 2024

All back to normal!

And I learned something along the way. Thanks :)

from polymorph.

Related Issues (13)

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.