mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-05 02:42:26 -05:00
Add Javascript feature detection for oninput
This commit adds a feature detection for the `oninput` event, which isn’t supported in older browsers[1]. This means that the code that highlights placeholders will only be run in browsers that support the `oninput` event. 1. http://caniuse.com/#feat=input-event
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
(function(Modules) {
|
||||
"use strict";
|
||||
|
||||
if (
|
||||
!('oninput' in document.createElement('input'))
|
||||
) return;
|
||||
|
||||
const tagPattern = /\(\([^\)\(]+\)\)/g;
|
||||
|
||||
Modules.HighlightTags = function() {
|
||||
|
||||
Reference in New Issue
Block a user