Coder Social home page Coder Social logo

Comments (6)

WebReflection avatar WebReflection commented on August 18, 2024

you got me there, I've never thought somebody would've used node instanceof HTMLElement to distinguish between nodes, instead of node.nodeName which for non custom elements makes much more sense, IMO.

However, no excuses, my poly breaks these expectations and it shouldn't.
I'm thinking about a solution, because patching document.createElement is not enough: any native element could be grabbed at any time ... this is a tough one.

from document-register-element.

WebReflection avatar WebReflection commented on August 18, 2024

actually, would you mind trying 1.0.2 and tell me if it fixes the issue?

from document-register-element.

WebReflection avatar WebReflection commented on August 18, 2024

actually I have a test in place that shows it's fixed now. Thanks

from document-register-element.

Florian-R avatar Florian-R commented on August 18, 2024

Wow, that was quick, you were faster to fix it than me to locate the bug 👍. I can confirm the fix is OK with 1.0.4.

Me just being curious, any reason you've used Object.defineProperty in the first time?

Thanks a lot.

from document-register-element.

WebReflection avatar WebReflection commented on August 18, 2024

Because inheriting gives me full privileges to my prototype while natives are extremely differently handled by various vendors. WebKit has it frozen, others have some property non configurable but writable, etc. Indeed, with latest I'm working on right now, Safari can't possible have the constructor overwrite but at least instanceof works as expected.

from document-register-element.

Florian-R avatar Florian-R commented on August 18, 2024

I see. Thanks for the heads up.

from document-register-element.

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.