5 ms·
ugh the gmail lightpanel does this as part of goog's strategy of deeply nested divs ftw in modern gmail `document.querySelector('div[role="img"] img')` to loo
by awinter-py 5y ago
ugh the gmail lightpanel does this
as part of goog's strategy of deeply nested divs ftw in modern gmail
`document.querySelector('div[role="img"] img')` to look at it
from what I can see, the width & height in the parent div's style are changing manually every time I zoom, i.e. JS event. This is probably why it takes a second to update; css would be synchronous with the rest of the UX zooming, unless there's an animation
yuck. also impossible to right click, so no easy way to view the image in another tab
- cuttysnark 5y agoTIL (last week) Chrome DevTools understands $$ as document.querySelector [0] e.g. $$('div[role="img"] img') [0] https://javascript.plainenglish.io/an-easy-way-of-accessing-elements-of-a-webpage-in-browser-9ad848dceba1 https://javascript.plainenglish.io/an-easy-way-of-accessing-...
- awinter-py 5y agouseful! thanks
- majewsky 5y agoI think you mean `document.querySelectorAll`. `document.querySelector` is aliased to $, at least in my Firefox. Also, as a caveat, this only works when `window.$` and `window.$$` have not been defined by the site's JS code.