nuxt / devtools

Unleash Nuxt Developer Experience
https://devtools.nuxt.com
MIT License
2.88k stars 160 forks source link

feat: enable picture in picture for localhost #627

Closed ManUtopiK closed 6 months ago

ManUtopiK commented 6 months ago

Moving the devtools to picture in picture mode is really great :rocket: But why limit this feature only for https ?

DocumentPictureInPicture is allowed only in secure context, but localhost is a secure context.

This pull request uses window.isSecureContext detection instead of relying on the location protocol.

Tested on nixOS with the most recent versions of Chromium, Google Chrome and Vivaldi.