GithubHelp home page GithubHelp logo

Comments (2)

wkeese avatar wkeese commented on July 28, 2024

Good catch. Thanks for letting us know.

That's a weird one, especially how Element#role is initially of type "object" instead of type "string" (but then the type changes to "string" once you set a value). In other words this seems like a safari bug rather than a design problem with delite, so we should fix it with that in mind.

I suppose that your suggestion of checking for elem[propName] != null will work, as there probably aren't any properties on native HTML Elements that are null. I'm not sure if it's the best approach either. Maybe just a special case for "role" might be better. Hmm.

from delite.

wkeese avatar wkeese commented on July 28, 2024

Johan - I tried your fix but getAttribute("role") still returns undefined rather than "presentation". There's some weirdness going on because this simple test works as expected:

var div = document.createElement("div");
div.role = "presentation";
div.getAttribute("role")    // --> "presentation"

Anyway, since that's not working I will check in a different fix that does.

from delite.

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.