JSFiddle - React, Tailwind, and code Playground

HTML

<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.4/themes/ui-lightness/jquery-ui.css">

JavaScript

/*
    Tests each attribute selector using querySelectorAll as a simple word with and without quotes.
*/
var selectors = [
    '|',
    '*',
    '~',
    '$',
    '' ,
    '!',
    '^'
];

selectors.forEach(function(s) {
    var selector = '[name' + s + '=test]';
    try {
        document.querySelectorAll(selector);
    } catch(e) {
        document.write('<br><br>' + e.name + ': ');
        document.write(selector);
    }
    
    var selector = '[name' + s + '="test"]';
    try {
        document.querySelectorAll(selector);
    } catch(e) {
        document.write('<br><br>' + e.name + ': ');
        document.write(selector);
    }
});