question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

capturePage with hidden window

See original GitHub issue

Hi. I open new hidden window with

window.require('nw.gui').Window.open('http://site.com', {'show':false}, function(newWindow){
    newWindow.once('loaded', function(){
          newWindow.capturePage(function(data){console.log(data)}, {'format':'png'})
    })
})

and console.log() show me undefined. but with not hidden window evething is good. this trouble I met with nw 0.13.4 but with 0.12.1 it works normally

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:9

github_iconTop GitHub Comments

1reaction
1j01commented, Jan 30, 2018

@danschumann If you wanted to get a Text node in the DOM that a user clicked on, you could use getSelection().anchorNode. But if you really want only the shape of the text to be clickable, it seems like you’d have a much easier time drawing the text to a canvas and using isPointInPath (or even getImageData), or using SVG and a click event. And then you could do hover effects as well. But I don’t know what your use case is, so… I don’t know if that’s helpful, but, just… making a tiny window to get the color of a pixel seems very roundabout / hacky (although also clever / interesting)

0reactions
stale[bot]commented, Feb 7, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to make capturePage work when the window is not visible?
The following code works for hidden, offscreen and visible browser windows as well even when they're covered by other windows
Read more >
How to take a screenshot of a window larger than the screen
I believe Screenshot Captor is the tool you're looking for. It involves a slight learning curve though and the scrolling window capture feature...
Read more >
BrowserWindow | Electron
Create and control browser windows. ... will be hidden only when the window is minimized or explicitly hidden with win.hide() . ... capturePage([rect])...
Read more >
How to capture the hidden program window? - AutoIt
How to capture the hidden program window?For example:#include ScreenCapture.au3 $runPID = Run ("C:\OK.exe", "C:\",@SW_HIDE) $runPID ...
Read more >
Window - NW.js Documentation
capturePage (callback [, config ]); win.captureScreenshot(options [, callback]) ... Hide the window. User will not be able to find the window once it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found