-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Browser says "SyntaxError: '' is not a valid selector" #79
Comments
Can you provide the HTML that's causing this error and describe the
operation you're attempting on it?
|
Hello, same error happens to me on Firefox 56 on Lubuntu 17.10. After I run M-x run-skewer and switch to skewer-repl, any command I type and send causes this error. I've set up chromium as my browser and tried it again, it gives an error on the same line, but the error message is more explanatory. Failed to load resource: the server responded with a status of 404 (Not Found) The function that gives the error is: buildSelector(ancestry) returns empty, and therefore document.querySelector(nil) fails. I installed skewer directly from melpa. I'd be happy to provide more information. |
Happens to me also. Running the demo included with skewer fails with the same message. I used Chrome 65 on Windows 7.
It seems to try evaluating the top-level HTML tag on startup but fails because the ancestry list is null, which ends up creating a blank CSS selector. But the blank ancestry list is created in Emacs as well when I evaluate As a workaround I modified (defun skewer-html-compute-tag-ancestry ()
"Compute the ancestry chain at point."
(skewer-html--with-html-mode
(nreverse
(cl-loop for tag in (skewer-html--get-context)
for nth = (skewer-html-compute-tag-nth (1+ (sgml-tag-start tag)))
for name = (skewer-html--cleanup tag)
;;unless (equal name "html")
collect (list name nth))))) This way an |
Firefox 51.0.1 (64-bit) at Arch Linux
Browser console:
SyntaxError: '' is not a valid selector skewer:210
query http://127.0.0.1:8080/skewer:210:16
skewer.fn.html http://127.0.0.1:8080/skewer:218:18
callback http://127.0.0.1:8080/skewer:14:22
skewer.getJSON/xhr.onreadystatechange http://127.0.0.1:8080/skewer:39:13
The text was updated successfully, but these errors were encountered: