I've a little headache with this console error, ONLY on Safari (working on MacBook actually).
I have this function:
function exists(element){
var exists = document.querySelector(element);
return exists;
}
invoked inside another function:
function includeHoverStylesheet(){
var path = $("body").attr("data-hover");
if (!("ontouchstart" in document.documentElement || exists("link[href='" + path + "'"))) {
var link = document.createElement("link");
link.rel = "stylesheet", link.href = path, document.head.appendChild(link) && document.body.removeAttribute("data-hover");
}
}
Now, on Chrome works like a charm, but on Safari the console throw this error:
1) Invalid CSS property declaration at: *
2) jQuery.Deferred exception: The string did not match the expected pattern.
3) SyntaxError (DOM Exception 12): The string did not match the expected pattern.
Someone have idea what hell happening???
Thanks in advance guys!