首页 \ 问答 \ 如何使用HTML / CSS / JavaScript开发桌面应用程序?(How to develop Desktop Apps using HTML/CSS/JavaScript? [closed])

如何使用HTML / CSS / JavaScript开发桌面应用程序?(How to develop Desktop Apps using HTML/CSS/JavaScript? [closed])

首先,我没有兴趣做这个专业。 我是一名Web开发人员,我最近离职的Spotify的同事,他表示他将主要使用JavaScript进行Spotify Desktop应用程序。 他表示,它使用“Chrome框架”,内部的一切都像网页应用程序(HTML / JS / CSS)一样完成。

作为一名没有为桌面制作任何东西的网络开发人员,这是一个好消息。 如果我可以使用我已经知道的技术,并将它们实现在某种“框架”中,并且仍然可以构建一个Windows或更好的跨平台应用程序。

我知道我没有提到数据库,但即使是一个简单的hello world桌面应用程序与网络技术将是很好的去。

那么怎么会这样呢? 我需要/需要知道什么?


First, I'm not interested in doing this professionally. I am a web developer, a coworker of mine recently left for Spotify and said he will be working mostly in JavaScript for the Spotify Desktop app. He said it uses "Chrome frame" and everything inside is done like a web app (HTML/JS/CSS).

As a web developer who never built anything for Desktop, this is great news. If I can use the technologies I already know and implement them inside some sort of a "frame" and still be able to build a windows or better yet cross platform app.

I know I didn't mention anything about the database, but even a simple hello world desktop app with web technologies would be great to get going.

So how does one go about this? Exactly what do I need/need to know?


原文:https://stackoverflow.com/questions/12232784
更新时间:2022-06-11 18:06

最满意答案

尝试使用descendant-or-self

//span/descendant-or-self::*[normalize-space() = 'my cool text']

请注意, normalize-space不会删除单词之间的空格

在这里演示 - http://www.xpathtester.com/obj/fdbdafbe-22a5-4fac-a249-30c92dcb143a

如果你真的需要将文本与删除的所有空格匹配,这似乎有效......

//span/descendant-or-self::*[translate(normalize-space(), ' ', '') = 'mycooltext']

演示 - http://www.xpathtester.com/obj/e893f3e1-6d57-445c-9802-d7525bcd6b31


Try using the descendant-or-self axis

//span/descendant-or-self::*[normalize-space() = 'my cool text']

Note that normalize-space won't remove the spaces between the words

Demo here - http://www.xpathtester.com/obj/fdbdafbe-22a5-4fac-a249-30c92dcb143a

If you really need to match the text with all spaces removed, this seems to work...

//span/descendant-or-self::*[translate(normalize-space(), ' ', '') = 'mycooltext']

Demo - http://www.xpathtester.com/obj/e893f3e1-6d57-445c-9802-d7525bcd6b31

相关问答

更多
  • 将SelectSingleNode方法的结果转换为XmlElement并将IsEmpty属性设置为true: DirectCast(xml.SelectSingleNode("/root/child1"), XmlElement).IsEmpty = true; Cast SelectSingleNode method result to XmlElement and set IsEmpty property to true: DirectCast(xml.SelectSingleNode("/root/ ...
  • 如果您想了解XSL转换的作用,请使用一个工具来显示实际生成的代码(例如xsltransform.net) - 而不是浏览器。 - michael.hor257k 我非常同意这一点,请使用例如http://xsltransform.net/ 。 TL; DR: /是文档节点, /*是输入文档的最外层元素 从第一个样式表获得的输出是
    • type="text/xsl" href="cd.xsl"
    ...
  • 尝试使用descendant-or-self轴 //span/descendant-or-self::*[normalize-space() = 'my cool text'] 请注意, normalize-space不会删除单词之间的空格 在这里演示 - http://www.xpathtester.com/obj/fdbdafbe-22a5-4fac-a249-30c92dcb143a 如果你真的需要将文本与删除的所有空格匹配,这似乎有效...... //span/descendant-or-self ...
  • XPath 1.0不提供转义引号的方式。 相反,使用单引号作为您的XPath字符串分隔符,因为您可以通过将它们加倍来避免SQL中的单引号: select xpath(E'//book[title = ''["a book"]'']/price/text()', xmlparse(document b.content))::text[] from booksite b XPath 1.0 provides no way of escaping quotes. Use single-quote ...
  • 要查找包含任何文本的节点,只需使用:// div [5] / div / div [2] / div [text()] To find node that contains any text simply use: //div[5]/div/div[2]/div[text()]
  • 如果字符串出现在另一个字符串中,则contains只能测试。 group/text()不是字符串,它是节点的集合/序列。 您可以使用 //element[group/text() = "Group 1"] contains can only test, if a string occurs in another string. group/text() is not a string, it is a set/sequence of nodes. You can use //element[group/t ...
  • 以下XPath表达式, //UserId/text() 会选择? 按照要求。 笔记: UserId没有名称空间,因此您不需要paf:UserId 。 如果有多个UserId ,您可以将UserId[1]添加到表达式中。 UserId上没有text属性,因此您不需要UserId/@text ,但UserId下面有一个text()节点,因此您需要UserId/text() 。 如果UserId下面可能有进一步的标记,您可能需要其字符串值string(//UserId) ,而不是选择其子文本节点。 The fo ...
  • 一个更简单,更具前瞻性的策略是将XPath表达式分离为搜索所需WebElements的2/3个不同表达式,但如果您确实需要使用单个XPath表达式,我想您可以使用| 运营商设计的东西: //input[@type="text" or @type="password"] | //textarea A simpler and more future-proof strategy would be separate the XPath expression into 2/3 distinct expression ...
  • Text是它自己的文本节点,因此正确的选择器将是: .//div[@id='id']/text() Text is its own text node, so the correct selector would be: .//div[@id='id']/text()
  • 使用/使用XPath意味着从文档的根目录开始,这不是您想要的。 xpath将找到所有匹配的元素,这意味着还将找到包含所需文本的所有祖先节点,从而导致根目录下的所有内容满足条件。 这是一个显示这个的例子: require 'nokogiri' xml = '

    foobar

    ' doc = Nokogiri::XML(xml) doc.xpath("/*[contains(., 'foobar')]").map(&:to_ht ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。