-1

I am getting the following issue in IE8. My code is working fine in Chrome, Mozilla and IE10. As IE8 doesn't support the canvas I am getting the following issue in it:

Object doesn't support property or method 'fillText'

Here is the jQuery line which I am getting this error on:

context.font = basefont+"px 'Trebuchet MS', Verdana, sans-serif";
context.fillText( (Math.round(parseFloat(v['value'] / totalValue * 1000 ))) /

Does anyone have a solution?

Felix
  • 37,892
  • 8
  • 43
  • 55
user2142786
  • 1,484
  • 9
  • 41
  • 74

1 Answers1

0

You can try to use Webshims which enables HTML5 and CSS3 features like semantic tags, canvas, web storage, geolocation, forms and multimedia to old versions of Internet Explorer.

Since it is based on jQuery and Modernizr, to use it you need include the dependencies jQuery and Modernizr alongside Webshims Lib:

<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.7.1/modernizr.min.js"></script>
<script src="scripts/webshim/polyfiller.js"></script>

After that, in order to initialize Webshims and require the support for canvas element, you can do:

$.webshims.polyfill('forms canvas'); 
Felix
  • 37,892
  • 8
  • 43
  • 55