Comments (4)
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)
skewer:212 Uncaught DOMException: Failed to execute 'querySelector' on 'Document': The provided selector is empty.
at query (http://127.0.0.1:8080/skewer:212:25)
at Object.skewer.fn.html (http://127.0.0.1:8080/skewer:220:18)
at callback (http://127.0.0.1:8080/skewer:14:45)
at XMLHttpRequest.xhr.onreadystatechange (http://127.0.0.1:8080/skewer:40:13)
The function that gives the error is:
function query(ancestry) { return document.querySelector(buildSelector(ancestry)); // this line is problematic }
buildSelector(ancestry) returns empty, and therefore document.querySelector(nil) fails.
I installed skewer directly from melpa.
I'd be happy to provide more information.
from skewer-mode.
from skewer-mode.
Happens to me also. Running the demo included with skewer fails with the same message. I used Chrome 65 on Windows 7.
Uncaught DOMException: Failed to execute 'querySelector' on 'Document': The provided selector is empty.
at query (http://127.0.0.1:8080/skewer:212:25)
at Object.skewer.fn.html (http://127.0.0.1:8080/skewer:220:18)
at callback (http://127.0.0.1:8080/skewer:14:45)
at XMLHttpRequest.xhr.onreadystatechange (http://127.0.0.1:8080/skewer:40:13)
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 skewer-html-compute-tag-ancestry
on the top level tag.
As a workaround I modified skewer-html-compute-tag-ancestry
as follows:
(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 html
tag will always be included in the ancestry. Then everything works swimmingly.
from skewer-mode.
So.. any progress on this? The problem is still there as far as I see. @skeeto do you think the solution provided by @Ruin0x11 is good enough to be merged?
from skewer-mode.
Related Issues (20)
- Modification: make org babel js blocks use skewer when it is connected HOT 1
- Can't evaluate html and css. HOT 7
- Considered using in Web Mode? HOT 10
- syncing between html source and rendered page HOT 4
- Can't skewer some sites: Content Security Policy HOT 2
- Warnings in Chromium HOT 3
- Is it possible to load an html template for a skewer page?
- Can we increase z-index of the red/green triangle?
- Is the default keybinding working as intended? HOT 2
- skewer.log messages arrive out of order HOT 1
- Simplify & add to docs to communicate to the "external" site HOT 2
- ReferenceError: skewerNativeXHR is not defined HOT 1
- can not use 'package-delete' to remove entirely HOT 2
- implicit tags break updates
- skewer-eval-defun doesn't recognize async javascript functions HOT 3
- Is there a way to disable the prompt when kill Emacs? HOT 2
- xwidgets support?
- how do I make skewer-mode to work with w3m and or ww3
- calls localhost/skewer/get instead of localhost:8080/skewer/get ?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skewer-mode.