Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last html5shiv.js doesn't work in ieTester #67

Open
Jojaba opened this issue May 18, 2012 · 6 comments
Open

Last html5shiv.js doesn't work in ieTester #67

Jojaba opened this issue May 18, 2012 · 6 comments

Comments

@Jojaba
Copy link

Jojaba commented May 18, 2012

Hello,

Sorry, but I'm not used to use github, so I don't know if this is the right place to submit this issue.
I inserted the script by using the following lines in my header :

<!--[if lt IE 9]>
    <script src="https ://github.com/aFarkas/html5shiv/blob/master/dist/html5shiv.js"></script>
<![endif]>

It didn't work...

I tried it another way by uploading the script and doing it this way:

<!--[if lt IE 9]>
    <script src="path_to_file/html5shiv.js"></script>
<![endif]>

It didn't work either... :(
IETester gave me an error message pointing to the line 4, character 1.

Line 3 :

m=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,i,j;(function(){var a=b.createElement("a");a.innerHTML="<xyz></xyz>";i="hidden"in a;if(!(a=1==a.childNodes.length))a:{try{b.createElement("a")}catch(c){a=!0;break a}a=b.createDocumentFragment();a="undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}j=

Line 4 :

a})();var e={elements:d.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:!1!==d.shivCSS,shivMethods:!1!==d.shivMethods,type:"default",shivDocument:h};g.html5=e;h(b)})(this,document);

I deleted the space between line 3 and 4 and then it worked...

Could you fix this?

Thanks in advance.

Jojaba

@vlakoff
Copy link
Contributor

vlakoff commented May 18, 2012

Try by using this code in your <head> section:

<!--[if lt IE 9]>
    <script src="html5shiv.js"></script>
<![endif]-->

@Jojaba
Copy link
Author

Jojaba commented May 18, 2012

I updated my first post I don't know wich syntax to use to write code here sorry !!!

@Jojaba
Copy link
Author

Jojaba commented May 18, 2012

I think a relative path to html5shiv.js won't be the good solution. I would prefer a direct link to github... ;)

@ctalkington
Copy link

I would suggest against using GH as a source. what if file gets updated that breaks everything as your linking directly to a repo file... someone does need to update cdnjs version of html5shiv but its much more suitable for using as source..

http://cdnjs.cloudflare.com/ajax/libs/html5shiv/r29/html5.js

@Jojaba
Copy link
Author

Jojaba commented May 20, 2012

Thanks for that advice ctalkington.
Well, I will do like I do for the moment, upload the modified html5shiv.js file to my host and link to it in my head section, that's the best way, I think, not to be surpised by an upcoming problem...

<!--[if lt IE 9]>
    <script src="path_to_file/html5shiv.js"></script>
<![endif]>

Where path_to_fil is the path to the uploaded shiv file.

@ctalkington
Copy link

gotcha, i have submitted some pull requests to cdnjs to add 3.5 versions of both print and non-print html5shiv.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants