1

I would like to utilize boilerplatejs for an upcoming intranet project, however, many of the machines are still WinXP with IE8 (and there's no option in the orginazation for wide-scale Firefox or Chrome deployment).

I've quickly tried incorporating the html5shiv, but that didn't seem to help. It doesn't appear routing or other functionality is working. I'm trying to figure out if this is even worth doing or if someone else has tried to get this working before spending more time on it.

Hasith
  • 1,749
  • 20
  • 26
dryer70
  • 53
  • 3
  • I have successfully adapted *boilerplatejs* to work with IE8 in a complex application, so I can confirm this is not a limit. If you posted specific error message you get, it would help to answer your question. – Stas Slabko Feb 13 '13 at 18:07
  • Stas's changes are now merged in to main BoileplateJS repository. Now onward it should be working fine with IE 8. – Hasith Feb 21 '13 at 14:00

3 Answers3

2

Not really. That's what the code in h5bp is about

<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->

Those are conditional clauses for graceful degradation of ie < 9.

If this is a project where many people will be on ie<9, it might be better to use xhtml...just an engineering consideration

cliffbarnes
  • 1,396
  • 11
  • 21
2

In fact, the most difficult problems you'll encounter are not about boilerplatejs but external libraries.

Specific tweaks depend on the features you leverage in your application, but for a start all you need to to is to

  • add html5shim to support HTML5 elements like <section>
  • include json2 library for missing json serialization support
  • [optionally] include explorercanvas to enable flot charting

Put this inside your <head> section:

<!--[if lt IE 9]>
<script type="text/javascript" charset="utf-8" src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<script type="text/javascript" charset="utf-8" src="http://cdnjs.cloudflare.com/ajax/libs/json2/20110223/json2.js"></script>
<script type="text/javascript" charset="utf-8" src="http://explorercanvas.googlecode.com/svn/trunk/excanvas.js"></script>
<![endif]-->

With this snippet you'll get boilerplatejs example page working, with routing, themes and i18n support.

Then, you'll notice that in the Click Counter example you don't win regardless how many times you click on the button. This is because LOTTERY_ACTIVITY event published by clickCounter/clickme component doesn't reach any listeners due to a bug(?) in pubsub.js library (I even submitted an issue some time ago). To resolve it, patch libs\pubsub\pubsub-20120708.js, changing

params = (args.length > 1) ? Array.prototype.splice.call(args, 1) : []

to IE8-compatible call:

params = (args.length > 1) ? Array.prototype.splice.call(args, 1, args.length-1) : []

Congratulations... You WON!!!

I leave fixing remaining issues in the Backbone TODO module up to you, you may use the original code as a guidance.

To summarize, I would say that boilerplatejs is fully IE8-compatible, with any incompatibilities coming from supporting libraries, not the core code.

Stas Slabko
  • 506
  • 5
  • 14
0

BoilerplateJS core is not designed with any HTML5 features. Though I haven't tested it in IE8, I believe this is very much possible with some adjustments. For example, if crossroadsJS, the library used for routing is not compatible with IE8, still you may easily replace that with pathJS or something else that is IE8 compatible.

Hasith
  • 1,749
  • 20
  • 26
  • My cursory glance at BoilerplateJS core seemed to indicate this. I hadn't thought of just dealing with the offending libraries, but that is easy enough in BoilerplateJS for me to continue down this path. That's one of the reasons I enjoy using BoilerplateJS! – dryer70 Feb 04 '13 at 21:31
  • Tell us if u do any improvements. We may merge such to the mainstream code base! – Hasith Feb 10 '13 at 00:36