Giter Site home page Giter Site logo

Comments (6)

jonathantneal avatar jonathantneal commented on July 19, 2024

It really depends on how you want to setup your application. I think this is a great idea, but Iā€™d need to be convinced before I recommended it in the out-of-the-box instructions. Perhaps we could start a wiki. Would you be interested in writing a document on how you would use svg4everybody and modernizr together?

from svg4everybody.

ismay avatar ismay commented on July 19, 2024

It really depends on how you want to setup your application.

That's true, it's just a possible solution. It makes sense to me as this is what modernizr and yepnope were meant to do, but I'm not sure whether this would make much of a difference performance wise.

Perhaps we could start a wiki. Would you be interested in writing a document on how you would use svg4everybody and modernizr together?

I wouldn't mind writing a document, but I don't know whether I'd have anything useful to say. But I'd be happy to help where I can. What exactly were you thinking about including in the document?

Btw., as I said above, first there needs to be a modernizr test that reliably tests for svg fragment identifier support (http://caniuse.com/svg-fragment). It doesn't look like such a test is currently shipped with modernizr: https://github.com/Modernizr/Modernizr/tree/master/feature-detects/svg

A quick search led me to this:

function supportsSvgView() {
    return document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#View", "1.1");
}

if(supportsSvgView()) {
    alert('Supported');
}
else {
    alert('Not supported');
}

http://jsfiddle.net/w2aLc3k9/, forked from: http://stackoverflow.com/a/22845912

But I'm not sure whether this would actually reliably test for fragment identifier support.


Correction: an issue on the modernizr repo (Modernizr/Modernizr#1409) shows that:

modernizr can't really use any external uris, ever. all of our tests need to be self contained and not realiant upon a network connection.

So this'll first need to be solved before svg4everybody can be used with modernizr and yepnope.

from svg4everybody.

kavika13 avatar kavika13 commented on July 19, 2024

This might not be the place to ask this, but we're talking about where to load the library...

Is there anything special about this library that requires that you load it in the head of the document instead of at the foot of the body? I've seen only a few other libraries that needs to be loaded in the head, and they're also a polyfills.

from svg4everybody.

Rowno avatar Rowno commented on July 19, 2024

@kavika13 From the README:

Only IE6-8 require the script run this early, in order to shiv the svg and use elements.

from svg4everybody.

kavika13 avatar kavika13 commented on July 19, 2024

TYVM!

from svg4everybody.

jonathantneal avatar jonathantneal commented on July 19, 2024

Version 2 allows you to activate svg4everybody whenever you decide to.

from svg4everybody.

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.