使用electron中的webView标签
来源:互联网 发布:c语言编程题目及答案 编辑:程序博客网 时间:2024/06/14 13:59
使用这个标签和正常写网页相似,在你的html文件中添加标签
<webview src="http://www.cityfoodmap.com:9091" autosize="on" minwidth="1350" minheight="660" ></webview>
根据官方的说法,webView标签在浏览器中,加载完成之后是在里面嵌套了一个Object标签。这样这个Object标签我们不方便控制他的宽高。那么我们可以使用如下css来进行设置webView显示的宽高.
然后在script标签中使用如下js,来获取到webView这个对象。从而方便接下来对webview的操作
var webview = onload = () => { webview = document.querySelector('webview') }
使用这个标签的时候,需要注意一个东西,就是在main.js中千万不要使用属性
webPreferences: { nodeIntegration: false }
这是在页面是禁止使用node语法。
阅读全文
0 0
- 使用electron中的webView标签
- 通过electron的webView使用按钮控制前进后退
- Android中的WebView使用
- Electron中的一些API
- Electron-使用Electron开发第一个应用
- 使用electron-builder来打包electron应用
- electron使用 sqlite3
- Electron中使用flash
- 使用Electron builder打包
- 从零开始使用Electron
- Electron中使用JQuery
- electron ts 使用笔记
- Android中的WebView使用(一)
- Android中的webview详细使用
- Electron
- electron
- electron(1)安装和使用
- 使用electron打包桌面应用
- 从0开始学习 GitHub 系列之「07.GitHub 常见的几种操作」
- SVM相关知识点
- ElasticSearch的 Query DSL 和 Filter DSL
- Android YUV
- [Python]
- 使用electron中的webView标签
- View 自定义属性在 XML 中没有代码提示问题
- unittest框架实战(四)
- 深入浅出 Redis client/server交互流程
- Oracle expdp/impdp工具使用详解
- jQuery 第一天
- 对CNN中pooling的理解
- Permutations II -Leetcode
- cpu之Memory_Writeback