UNPKG

polyfill-service

Version:
20 lines (17 loc) 397 B
(function (global) { /* * Browsers may have: * No global URL object * URL with static methods only - may have a dummy constructor * URL with members except searchParams * Full URL API support */ 'use strict'; try { var nativeURL = new global.URL('http://example.com'); return 'href' in nativeURL && 'searchParams' in nativeURL; } catch (error) { return false; } }(this))