Title: wp-polyfill error
Last modified: April 4, 2019

---

# wp-polyfill error

 *  Resolved [msilb0r](https://wordpress.org/support/users/msilb0r/)
 * (@msilb0r)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/wp-polyfill-error/)
 * Hello,
 * when I activate the plugin, it will break the site by adding
    `async='async'`
   to every script line. Since WordPress uses Gutenberg officially with Version 
   5.0 the wp-polyfills-*-min.js are added in a special way.
 * Code:
 *     ```
       <script type='text/javascript'>
       ( 'fetch' in window ) || document.write( '<script async='async' src="https://example.com/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0"></scr' + 'ipt>' );( document.contains ) || document.write( '<script async='async' src="https://example.com/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.26.0-0"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script async='async' src="https://example.com/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script async='async' src="https://example.com/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2"></scr' + 'ipt>' );
       </script>
       ```
   
 * Error:
 * > Uncaught SyntaxError: missing ) after argument list
 * Kind regards.
    -  This topic was modified 7 years, 2 months ago by [msilb0r](https://wordpress.org/support/users/msilb0r/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/wp-polyfill-error/#post-11393459)
 * Can you try excluding `js/dist` from being asynced?
 * Hope this helps,
    frank
 *  Thread Starter [msilb0r](https://wordpress.org/support/users/msilb0r/)
 * (@msilb0r)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/wp-polyfill-error/#post-11393615)
 * Thank you frank!
 * This works!
 * Solved!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 1 month ago](https://wordpress.org/support/topic/wp-polyfill-error/#post-11394288)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/async-javascript/reviews/#new-post)!
   🙂

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘wp-polyfill error’ is closed to new replies.

 * ![](https://ps.w.org/async-javascript/assets/icon-128x128.png?rev=1839260)
 * [Async JavaScript](https://wordpress.org/plugins/async-javascript/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/async-javascript/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/async-javascript/)
 * [Active Topics](https://wordpress.org/support/plugin/async-javascript/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/async-javascript/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/async-javascript/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [7 years, 1 month ago](https://wordpress.org/support/topic/wp-polyfill-error/#post-11394288)
 * Status: resolved