diff --git a/wp-includes/js/wp-custom-header.js b/wp-includes/js/wp-custom-header.js index 80e00e5a74..80ebd917dc 100644 --- a/wp-includes/js/wp-custom-header.js +++ b/wp-includes/js/wp-custom-header.js @@ -1,5 +1,10 @@ (function( window, $, settings ) { + if ( ! ( 'addEventListener' in window ) ) { + // Fail gracefully in unsupported browsers. + return; + } + function wpCustomHeader() { var handlers = { nativeVideo: { diff --git a/wp-includes/js/wp-custom-header.min.js b/wp-includes/js/wp-custom-header.min.js index 7d95db10b1..751f1aff77 100644 --- a/wp-includes/js/wp-custom-header.min.js +++ b/wp-includes/js/wp-custom-header.min.js @@ -1 +1 @@ -!function(a,b,c){function d(){function d(){if(c.container=document.getElementById("wp-custom-header"),g()){for(var a in h){var d=h[a];if(h.hasOwnProperty(a)&&d.test(c)){d.callback(c);break}}b("body").trigger("wp-custom-header-video-loaded")}}function g(){return!(a.innerWidth