-1

I am trying to add canvas support for IE 9 and below for a drupal 8 site. Can anyone suggest an approach for this? I am planning on using Modernizr and Explorer Canvas polyfill to achieve this.

1 Answer 1

0

Sure, there are plenty of choices:

  1. If there are CDNs available you can add the library directly through your theme or module's library.yml file.

https://ajax.googleapis.com/ajax/libs/angularjs/1.4.4/angular.min.js: { type: external, minified: true }

  1. If you use a build system like Gulp you could add the libraries as dependencies in the package.json and from there require them when building the JavaScript file that you later include in Drupal.

  2. Use Libraries API: https://www.drupal.org/node/2605130

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.