是否可以使浏览器的一部分透明以在Web应用程序中显示底层桌面/窗口? [英] Is it possible to make part of the browser transparent to display underlying desktop/windows in a web app?

查看:134
本文介绍了是否可以使浏览器的一部分透明以在Web应用程序中显示底层桌面/窗口?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网络应用程序(意味着以富客户端身份运行工作,并且能够承担要求任何(甚至每晚构建)Firefox版本的Chromium)。



应用程序界面背景是透明的(显示底层窗口或桌面)。我该如何实现呢?



主要目标平台是Linux。



技术上无关于代码交互和打破沙箱。这是关于窗口组成。我甚至认为它可以很容易地实现在组合窗口管理器没有浏览器,甚至知道这只是替换一些无用的颜色(例如fuchsia被广泛使用的Windows 9x时代)与底层图层内容。 / p>

在政治上,这可以并且应该是一个受限的功能(例如本地文件和网络摄像机访问)应用程序(基于本地基于web技术的富客户端应用程序似乎是一个趋势开始 - Firefox和Chromium实现越来越多的功能,以促进这一点),并禁止未知的第三方网站(但这将需要更复杂的交互的浏览器和一个窗口管理器)。



原因为什么我喜欢它是我想建立一个跨平台Mac),零安装,花哨的富客户端应用程序(不意味着作为一个互联网网站)与网络技术(如HTML5,CSS3和JavaScript)。我甚至可能会试图使用一些无浏览器窗口的技术来运行它(我听说过Mozilla Prism和XulRunner,KDE和Windows提供使用HTML的桌面小部件,Chromium是提供类似的东西等)

解决方案

这是不可能的当前,但没有技术原因导致浏览器无法为此提供专有API ,使用非标准的html / css / js。



然而,这是需要的,一个浏览器实际实现这个功能,然后公开它作为一个API,甚至



UPDATE(因为有些人可能误解了我的回答???):



<我给这个问题的技术上下文。当然,没有人会去实现这一点,但我说它在技术上是可能的。



此外,这样做不会打破沙箱模型。浏览器本身(忘记API一秒钟)可以以任何想要的方式实现透明。一旦它可以钩住它的Javascript引擎,并创建一个愚蠢的调用:Chrome.Element()。WeirdTransparency()



更新到问题的更新: >

到您的观点:


我喜欢的原因是
我想建立一个跨平台的
(Linux,Windows,Mac),零安装,
看起来很富有的富客户端应用程序
(不是作为一个Internet
网站)


AIR kinda涵盖90%或您的要求。它仍然需要一个小的安装,但除此之外,你正在运行...


I am developing a web application (meant to run work as a rich client and able to afford requiring any (even nightly build) version of Firefox of Chromium).

The application interface background is meant to be transparent (showing underlying windows or desktop). How can I achieve this? Following standards does not matter but would be nice.

Primary target platform is Linux.

UPDATE addressing comments and answers received to the moment of 2010-07-07T01:44Z.

Technically it's nothing about code interaction and breaking the "sandbox". It's about window composition. I even think it can be implemented pretty easy in a compositive window manager without a browser even knowing of this - just replace some useless colour (for example "fuchsia" was widely used for this during Windows 9x age) with the underlying layer content.

Politically, this can and should be a restrictable function (like local file and webcam access, for example), which can be allowed for trusted intranet applications (local web-tech-based rich client applications seem to be a trend beginning - Firefox and Chromium implement more and more features to facilitate this) and forbidden for unknown 3-rd party websites (but this would require more complex interaction between a browser and a window manager).

The reason why would I like it is that I want to build a cross-platform (Linux, Windows, Mac), zero-install, fancy-looking rich client application (not meant to be served as an Internet website) with web technologies (like HTML5, CSS3 and JavaScript). I even will probably seek to use some browser-window-less tech to run it (I've heard about Mozilla Prism and XulRunner, KDE and Windows offer to use HTML for desktop widgets, Chromium is meant to offer something alike, etc.)

解决方案

This is not possible "currently", but there's no technical reason why a browser couldn't provide a proprietary API for this, using non standard html/css/js.

However, that's what it would take, a browser to actually implement this functionality and then expose it as an API, and even then it would be browser specific.

UPDATE (as some people have perhaps misunderstood my answer???):

I'm giving technical context to the question. Of course noone's ever going to implement this, but I'm saying it's technically possible.

Also, doing this would not break the sandbox model. The browser itself (forget an API for a second) could implement transparency any way it wanted. Once it that it could hook it up to it's Javascript engine, and create a stupid call: Chrome.Element("").WeirdTransparency()

UPDATE to Questioner's Update:

to your point:

The reason why would I like it is that I want to build a cross-platform (Linux, Windows, Mac), zero-install, fancy-looking rich client application (not meant to be served as an Internet website)

AIR kinda covers 90% or your requirements. It still needs a small install, but apart from that, you're running...

这篇关于是否可以使浏览器的一部分透明以在Web应用程序中显示底层桌面/窗口?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆