-
Notifications
You must be signed in to change notification settings - Fork 167
Extract DOM and CSS up to the root element #8
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
Comments
Hi! Thanks for input. I'm not 100% sure what situation are we talking here about, can you give me an example? Dumping whole |
Sure, here's what some users would like to see. Having <html>
<body>
<div id="header">...</div>
<div id="content">
<div class="foo">
<span class="investigate-this">...</span>
<span class="sibling">...</span>
</div>
</div>
<div id="footer">...</div>
</body>
</html> a developer might want to get only a tree of direct ancestors of <html>
<body>
<div id="content">
<div class="foo">
<span class="investigate-this">...</span>
</div>
</div>
</body>
</html> since ancestors may drastically affect the entire layout by means of successor/child selectors (we are not taking siblings into account, even though detecting if sibling selectors affect each of the ancestors in the tree would be awesome). |
Interesting proposition! Now that you mentioned it, I've seen that SnappySnippet is breaking |
Awesome! That thing with |
Hey Konrad. Any progress or ETA on this feature available? :) |
Hi! Sorry I haven't kept my promise. I'm snowed under nowadays, but I remember about this feature. It shouldn't be very hard to implement but there is one catch that comes to my mind. This functionality doesn't really fit anywhere right now (from the code and UI perspective):
Thoughts? |
Hey. I've got a patch. Basically, the object returned from Snapshooter will look like this:
Now, if we want to include the ancestor chain in the results, we just
But I need another pull request (related to CSS properties handling, already sent out) to get landed first. |
I too am extremely interested in including the ancestors' HTML and CSS in SnappySnippet. See https://code.google.com/p/chromium/issues/detail?id=121416 for use cases. |
Released to the Web Store (v0.4). |
While being immensely useful, the extension does not allow the extraction of the entire ancestor tree (up to the root element, with the ancestor elements' CSS), which may be crucial for getting the element's HTML in its surrounding context (e.g. when debugging layout issues)
The text was updated successfully, but these errors were encountered: