Comments (3)
We can use serializeDocument
from JSDOM to figure the right offset
from hint.
The current differences we have are:
JSDOM
doesn't return<!doctype html>
withouterHTML
JSDOM
andCDP
collapsedoctype
,html
andhead
in one single line
Because HTML allows to not have html
, head
and body
tags, and some times a website's markup can be really scary, I'm leaning towards having a aprox location
for the body and a location
of the issue in the elements outerHTML
.
The rules will use findInElement
and rule-context
will do the magic to find it in the document.
We should still try to find the right location in the document for a given element, but switching to this model will make testing rules a lot easier (at least with what we have right now).
from hint.
We could use parse5
to get the location of a dom. This is what jsdom
v10 uses (we should update our code to use it), not sure how we will do with cdp
but we should definitely look into it.
from hint.
Related Issues (20)
- [Bug] Throws exception when used in development mode in a git worktree
- [Bug] Bug description HOT 2
- Router
- [Bug] ''A form field element should have an id or name attribute'' should not display for `type="search"` inputs
- [Feature] Verify extension in Visual Studio Marketplace
- [Bug] Reenable Broken link found (404 response). HOT 1
- [Bug] Reenable lint-markdown-validator as a scheduled pipeline
- Console HOT 1
- cachae control missing Error
- [Feature] Update MDN compat data - it's 2 years old HOT 2
- [Bug] Bug description
- [Bug] axe-core reports "same id ...for control" even though they are isolated by a shadow-root HOT 1
- [Bug] Describe your bug here HOT 1
- [VSCode extension] how to see all hint issues in my project without opening all files?
- [Bug] Describe your bug here
- [Bug] No browser detected even if two installed & working
- [Feature] Axe errors: show which element the error is about
- [Bug] Bug description
- [Bug] Bug description
- [Bug] Extension incorrectly says `'@layer' is not supported by Chrome, Chrome Android, Edge...` HOT 7
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 hint.