Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code splitting for better testing and mantainability
- Loading branch information
Showing
3 changed files
with
18 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Check for :focus-within pseudo class support | ||
* @returns {Boolean} | ||
*/ | ||
function supportsFocusWithin () { | ||
try { | ||
document.querySelector(':focus-within') | ||
console.info('focus-within-polyfill: focus-within supported') | ||
return true | ||
} catch (error) { | ||
console.info('focus-within-polyfill: focus-within not supported') | ||
return false | ||
} | ||
} | ||
|
||
export default supportsFocusWithin |