{"id":23500398,"url":"https://github.com/winily/universal-webview","last_synced_at":"2025-04-15T18:42:23.630Z","repository":{"id":62342803,"uuid":"559754165","full_name":"winily/universal-webview","owner":"winily","description":"universal-webview is a graphical interface development framework based on system webview similar to Tauri","archived":false,"fork":false,"pushed_at":"2022-11-11T10:07:45.000Z","size":802,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T23:44:07.423Z","etag":null,"topics":["all-platforms","electron","tauri"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winily.png","metadata":{"files":{"readme":"README-CN.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-31T02:42:54.000Z","updated_at":"2023-08-23T06:32:42.000Z","dependencies_parsed_at":"2023-01-21T15:01:23.797Z","dependency_job_id":null,"html_url":"https://github.com/winily/universal-webview","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winily%2Funiversal-webview","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winily%2Funiversal-webview/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winily%2Funiversal-webview/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winily%2Funiversal-webview/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winily","download_url":"https://codeload.github.com/winily/universal-webview/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249131145,"owners_count":21217681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["all-platforms","electron","tauri"],"created_at":"2024-12-25T06:44:13.791Z","updated_at":"2025-04-15T18:42:23.612Z","avatar_url":"https://github.com/winily.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# universal-webview\n\n[中文]|\u003ca href=\"./README.md\"\u003e[English]\u003c/a\u003e\n\nuniversal-webview（接下来简称 UW）\n是一款基于系统 webview 的图形化界面开发框架灵感来源\n\u003ca href='https://tauri.app/'\u003eTauri\u003c/a\u003e\n与它类似，但 Tauri 是基于 rust 开发，UW 是基于 C++ 开发，\n因为没有依赖 chromium 所以 UW 要比 Electron 要轻量很多。\n不过对应的会产生一点问题就是每个平台的操作系统提供的 WebView\n都是不同的标准，在 Web API 上可能会有细微的区别。\n\n`tip: 因为我是个人开发者可能支撑度不会很高， 目前仅为实现自己需求的功能为主，如果需要去适配更多功能欢迎 PR 或者提出 issues`\n\n## Support\n\n#### MacOS\n\n- WebView\n- Clipboard\n- 导航菜单\n  \u003e 在 uw.config.json 中配置，然后会触发 js 事件通知到 webview\n  \u003e\n  \u003e 配置例子\n  \u003e\n  \u003e ```json\n  \u003e {\n  \u003e   \"menu\": {\n  \u003e     \"navigation\": [\n  \u003e       {\n  \u003e        \"name\": \"uw\",\n  \u003e        \"children\": [ { \"name\": \"about\", \"key\": \"about\" } ]\n  \u003e       },\n  \u003e       {\n  \u003e         \"name\": \"Window\",\n  \u003e         \"children\": [\n  \u003e          {\n  \u003e            \"name\": \"Minimize\",\n  \u003e            \"children\": [{\n  \u003e               \"name\": \"第三级\",\n  \u003e               \"children\": [ { \"name\": \"第四级\", \"key\": \"a44\" } ]\n  \u003e             }]\n  \u003e           }\n  \u003e        },\n  \u003e      ]\n  \u003e   }\n  \u003e }\n  \u003e ```\n- 资源本地化\n  \u003e 自定义了协议头，让制定写法的 URL 被内部代码拦截，访问到本地资源\n  \u003e\n  \u003e 以下例子为访问到本地的根目录是代码目录下的 resource\n  \u003e uwfile 是协议名，native 是 host 名 uwfile://native 后面才是真正的 URI\n  \u003e\n  \u003e ```html\n  \u003e \u003cscript src=\"uwfile://native/static/js/main.be3b70e5.js\" /\u003e\n  \u003e ```\n  \u003e\n  \u003e 默认协议是由 window.open 传入的指定，比如\n  \u003e\n  \u003e ```C++\n  \u003e window.open('uwfile://native/index.html')\n  \u003e ```\n  \u003e\n  \u003e 那么默认路径就是 uwfile://native，如果写相对路径\n  \u003e 就都会走 uwfile://native\n  \u003e 除非写绝对路径例如 https://www.baidu.com\n\n## TODO\n\n#### MacOS\n\n- fs\n\n#### Windows\n\n- WebView2\n- Clipboard\n- fs\n- 资源本地化\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinily%2Funiversal-webview","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinily%2Funiversal-webview","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinily%2Funiversal-webview/lists"}