我想知道::-webkit-search-decoration
CSS 选择器中的部分做什么input[type="search"]::-webkit-search-decoration
?
为什么这会导致 en DOM Exception 错误?
function is(selector, element) {
var div = document.createElement("div"),
matchesSelector = div.webkitMatchesSelector;
return typeof selector == "string" ? matchesSelector.call(element, selector) : selector === element;
}
is('input[type="search"]::-webkit-search-decoration', document.body);