Coder Social home page Coder Social logo

Comments (4)

thenewguy avatar thenewguy commented on May 18, 2024

Okay. So I found out what is going on I think.

The problem is coming from jquery.URI.js here:

// pipe $.attr('src') and $.attr('href') through URI.js
var _attrHooks = {
    get: function(elem) {
        return $(elem).uri();
    },
    set: function(elem, value) {
        return $(elem).uri().href(value).toString();
    }
};

I am creating an html5 video like this:

    var video = document.createElement("video");
    var mp4 = document.createElement("source");
    $(mp4).attr("src", "awesome.mp4");
    $(mp4).attr("type", "video/mp4");

This doesn't do much in IE8, but I handle the IE8 video with flash player. However, jquery.URI.js appears to be intercepting the attr call and then it throws an error because IE8 doesn't know anything about the source element.

Is there anything I can do besides wrapping any attr call on an html5 element in a try block? (hope I don't need to do that because that will be a lot of extra typing)

from uri.js.

rodneyrehm avatar rodneyrehm commented on May 18, 2024

for now, edit the _attrHooks definition to ignore the source element. I'm not sure how to fix that properly at the moment.

from uri.js.

rodneyrehm avatar rodneyrehm commented on May 18, 2024

Can you provide a jsfiddle or jsbin so I can play around with this?

from uri.js.

srathbun avatar srathbun commented on May 18, 2024

When I used the build option on your main page, I got a very similar error.

Element "LABEL" does not have either property: href, src, action URI.js, line 78

Disabling the inclusion of the jQuery plugin and rebuilding removes this error. I don't need the integration, so this is just a heads up for you.

from uri.js.

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.