From 3cfe94c5efa02ca948cee183cce9ac8ff87e2ac2 Mon Sep 17 00:00:00 2001 From: Thorben Egberts Date: Wed, 21 Dec 2016 23:41:34 +0100 Subject: [PATCH 01/13] Fixed link to Quick Start --- docs/tutorial/about.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/about.md b/docs/tutorial/about.md index ddde8e0fc842..35cf6708dbe4 100644 --- a/docs/tutorial/about.md +++ b/docs/tutorial/about.md @@ -6,7 +6,7 @@ Electron began in 2013 as the framework on which [Atom](https://atom.io), GitHub It has since become a popular tool used by open source developers, startups, and established companies. [See who is building on Electron](/apps). -Read on to learn more about the contributors and releases of Electron or get started building with Electron in the [Quick Start Guide](../quick-start). +Read on to learn more about the contributors and releases of Electron or get started building with Electron in the [Quick Start Guide](http://electron.atom.io/docs/tutorial/quick-start/). ## Core Team and Contributors From b22eb0d65fb103e64f154bfae3b9af207cd24728 Mon Sep 17 00:00:00 2001 From: Thorben Egberts Date: Thu, 22 Dec 2016 08:45:51 +0100 Subject: [PATCH 02/13] Change Quick Start link from absolute to relative --- docs/tutorial/about.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/about.md b/docs/tutorial/about.md index 35cf6708dbe4..0344c9a1f998 100644 --- a/docs/tutorial/about.md +++ b/docs/tutorial/about.md @@ -6,7 +6,7 @@ Electron began in 2013 as the framework on which [Atom](https://atom.io), GitHub It has since become a popular tool used by open source developers, startups, and established companies. [See who is building on Electron](/apps). -Read on to learn more about the contributors and releases of Electron or get started building with Electron in the [Quick Start Guide](http://electron.atom.io/docs/tutorial/quick-start/). +Read on to learn more about the contributors and releases of Electron or get started building with Electron in the [Quick Start Guide](quick-start.md). ## Core Team and Contributors From ad2627b05ab9dbde337a6b12b4f022c0ddc60612 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 22 Dec 2016 09:22:04 -0800 Subject: [PATCH 03/13] Move variables from development to production --- docs/api/environment-variables.md | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/docs/api/environment-variables.md b/docs/api/environment-variables.md index a840eec1d175..83a233e0857a 100644 --- a/docs/api/environment-variables.md +++ b/docs/api/environment-variables.md @@ -46,14 +46,23 @@ geocoding requests. To enable geocoding requests, visit [this page](https://cons Disables ASAR support. This variable is only supported in forked child processes and spawned child processes that set `ELECTRON_RUN_AS_NODE`. +### `ELECTRON_RUN_AS_NODE` + +Starts the process as a normal Node.js process. + +### `ELECTRON_NO_ATTACH_CONSOLE` _Windows_ + +Don't attach to the current console session. + +### `ELECTRON_FORCE_WINDOW_MENU_BAR` _Linux_ + +Don't use the global menu bar on Linux. + ## Development Variables The following environment variables are intended primarily for development and debugging purposes. -### `ELECTRON_RUN_AS_NODE` - -Starts the process as a normal Node.js process. ### `ELECTRON_ENABLE_LOGGING` @@ -76,11 +85,3 @@ This environment variable will not work if the `crashReporter` is started. Shows the Windows's crash dialog when Electron crashes. This environment variable will not work if the `crashReporter` is started. - -### `ELECTRON_NO_ATTACH_CONSOLE` _Windows_ - -Don't attach to the current console session. - -### `ELECTRON_FORCE_WINDOW_MENU_BAR` _Linux_ - -Don't use the global menu bar on Linux. From 87f09131aa5998d62d8d53fb9a4992c9d9ed78a6 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 20 Dec 2016 15:52:58 -0800 Subject: [PATCH 04/13] Observe window and only use it when it is open --- atom/browser/ui/message_box_gtk.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/atom/browser/ui/message_box_gtk.cc b/atom/browser/ui/message_box_gtk.cc index 8f11c94b7d3c..b7406e141627 100644 --- a/atom/browser/ui/message_box_gtk.cc +++ b/atom/browser/ui/message_box_gtk.cc @@ -5,6 +5,7 @@ #include "atom/browser/ui/message_box.h" #include "atom/browser/browser.h" +#include "atom/browser/native_window_observer.h" #include "atom/browser/native_window_views.h" #include "atom/browser/unresponsive_suppressor.h" #include "base/callback.h" @@ -25,7 +26,7 @@ namespace atom { namespace { -class GtkMessageBox { +class GtkMessageBox : public NativeWindowObserver { public: GtkMessageBox(NativeWindow* parent_window, MessageBoxType type, @@ -77,6 +78,7 @@ class GtkMessageBox { // Parent window. if (parent_) { + parent_->AddObserver(this); parent_->SetEnabled(false); libgtk2ui::SetGtkTransientForAura(dialog_, parent_->GetNativeWindow()); gtk_window_set_modal(GTK_WINDOW(dialog_), TRUE); @@ -85,8 +87,10 @@ class GtkMessageBox { ~GtkMessageBox() { gtk_widget_destroy(dialog_); - if (parent_) + if (parent_) { + parent_->RemoveObserver(this); parent_->SetEnabled(true); + } } GtkMessageType GetMessageType(MessageBoxType type) { @@ -144,6 +148,11 @@ class GtkMessageBox { Show(); } + void OnWindowClosed() { + parent_->RemoveObserver(this); + parent_ = nullptr; + } + CHROMEGTK_CALLBACK_1(GtkMessageBox, void, OnResponseDialog, int); private: From 8c5f26373b05b9da98c411626d6dd99e2dacadb7 Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Tue, 20 Dec 2016 16:21:48 -0800 Subject: [PATCH 05/13] Add override --- atom/browser/ui/message_box_gtk.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atom/browser/ui/message_box_gtk.cc b/atom/browser/ui/message_box_gtk.cc index b7406e141627..f0ebc705b553 100644 --- a/atom/browser/ui/message_box_gtk.cc +++ b/atom/browser/ui/message_box_gtk.cc @@ -148,7 +148,7 @@ class GtkMessageBox : public NativeWindowObserver { Show(); } - void OnWindowClosed() { + void OnWindowClosed() override { parent_->RemoveObserver(this); parent_ = nullptr; } From b28a865436440cfb72c77bcb37a9dc418ebf31f5 Mon Sep 17 00:00:00 2001 From: Drew Chandler Date: Thu, 22 Dec 2016 09:51:39 -0800 Subject: [PATCH 06/13] Use localstorage in clearStorageData docs It won't work if you use include the space that is currently in the docs. --- docs/api/session.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/session.md b/docs/api/session.md index 2ea3807957a9..d50274e22e06 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -112,7 +112,7 @@ Clears the session’s HTTP cache. * `origin` String - Should follow `window.location.origin`’s representation `scheme://host:port`. * `storages` String[] - The types of storages to clear, can contain: - `appcache`, `cookies`, `filesystem`, `indexdb`, `local storage`, + `appcache`, `cookies`, `filesystem`, `indexdb`, `localstorage`, `shadercache`, `websql`, `serviceworkers` * `quotas` String[] - The types of quotas to clear, can contain: `temporary`, `persistent`, `syncable`. From 1085c28612a833b62dfe1f2f4bb715b4ff1aa492 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Wed, 9 Nov 2016 15:03:39 -0800 Subject: [PATCH 07/13] rename all web-view files to webview --- docs-translations/jp/api/{web-view-tag.md => webview-tag.md} | 0 docs-translations/ko-KR/api/{web-view-tag.md => webview-tag.md} | 0 docs-translations/zh-CN/api/{web-view-tag.md => webview-tag.md} | 0 docs/api/{web-view-tag.md => webview-tag.md} | 0 lib/renderer/{web-view => webview}/guest-view-internal.js | 0 .../web-view-attributes.js => webview/webview-attributes.js} | 0 .../web-view-constants.js => webview/webview-constants.js} | 0 lib/renderer/{web-view/web-view.js => webview/webview.js} | 0 .../pages/{web-view-log-process.html => webview-log-process.html} | 0 9 files changed, 0 insertions(+), 0 deletions(-) rename docs-translations/jp/api/{web-view-tag.md => webview-tag.md} (100%) rename docs-translations/ko-KR/api/{web-view-tag.md => webview-tag.md} (100%) rename docs-translations/zh-CN/api/{web-view-tag.md => webview-tag.md} (100%) rename docs/api/{web-view-tag.md => webview-tag.md} (100%) rename lib/renderer/{web-view => webview}/guest-view-internal.js (100%) rename lib/renderer/{web-view/web-view-attributes.js => webview/webview-attributes.js} (100%) rename lib/renderer/{web-view/web-view-constants.js => webview/webview-constants.js} (100%) rename lib/renderer/{web-view/web-view.js => webview/webview.js} (100%) rename spec/fixtures/pages/{web-view-log-process.html => webview-log-process.html} (100%) diff --git a/docs-translations/jp/api/web-view-tag.md b/docs-translations/jp/api/webview-tag.md similarity index 100% rename from docs-translations/jp/api/web-view-tag.md rename to docs-translations/jp/api/webview-tag.md diff --git a/docs-translations/ko-KR/api/web-view-tag.md b/docs-translations/ko-KR/api/webview-tag.md similarity index 100% rename from docs-translations/ko-KR/api/web-view-tag.md rename to docs-translations/ko-KR/api/webview-tag.md diff --git a/docs-translations/zh-CN/api/web-view-tag.md b/docs-translations/zh-CN/api/webview-tag.md similarity index 100% rename from docs-translations/zh-CN/api/web-view-tag.md rename to docs-translations/zh-CN/api/webview-tag.md diff --git a/docs/api/web-view-tag.md b/docs/api/webview-tag.md similarity index 100% rename from docs/api/web-view-tag.md rename to docs/api/webview-tag.md diff --git a/lib/renderer/web-view/guest-view-internal.js b/lib/renderer/webview/guest-view-internal.js similarity index 100% rename from lib/renderer/web-view/guest-view-internal.js rename to lib/renderer/webview/guest-view-internal.js diff --git a/lib/renderer/web-view/web-view-attributes.js b/lib/renderer/webview/webview-attributes.js similarity index 100% rename from lib/renderer/web-view/web-view-attributes.js rename to lib/renderer/webview/webview-attributes.js diff --git a/lib/renderer/web-view/web-view-constants.js b/lib/renderer/webview/webview-constants.js similarity index 100% rename from lib/renderer/web-view/web-view-constants.js rename to lib/renderer/webview/webview-constants.js diff --git a/lib/renderer/web-view/web-view.js b/lib/renderer/webview/webview.js similarity index 100% rename from lib/renderer/web-view/web-view.js rename to lib/renderer/webview/webview.js diff --git a/spec/fixtures/pages/web-view-log-process.html b/spec/fixtures/pages/webview-log-process.html similarity index 100% rename from spec/fixtures/pages/web-view-log-process.html rename to spec/fixtures/pages/webview-log-process.html From c75a1f08fdfa4d67c3ffc3f52e629f6db3466919 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Wed, 9 Nov 2016 15:04:00 -0800 Subject: [PATCH 08/13] replace all web-view code with webview --- docs-translations/es/README.md | 2 +- docs-translations/fr-FR/README.md | 2 +- docs-translations/it-IT/README.md | 2 +- docs-translations/jp/README.md | 2 +- docs-translations/jp/api/webview-tag.md | 6 +++--- docs-translations/ko-KR/README.md | 2 +- docs-translations/ko-KR/api/webview-tag.md | 4 ++-- docs-translations/pt-BR/README.md | 2 +- docs-translations/ru-RU/README.md | 2 +- docs-translations/th-TH/README.md | 2 +- docs-translations/tr-TR/README.md | 2 +- docs-translations/uk-UA/README.md | 2 +- docs-translations/zh-CN/README.md | 2 +- docs-translations/zh-CN/api/webview-tag.md | 6 +++--- docs-translations/zh-TW/README.md | 2 +- docs/README.md | 2 +- docs/api/webview-tag.md | 6 +++--- filenames.gypi | 8 ++++---- lib/renderer/init.js | 4 ++-- lib/renderer/webview/webview-attributes.js | 4 ++-- lib/renderer/webview/webview.js | 2 +- 21 files changed, 33 insertions(+), 33 deletions(-) diff --git a/docs-translations/es/README.md b/docs-translations/es/README.md index 1d8877bdacee..8badcf5d2fc6 100644 --- a/docs-translations/es/README.md +++ b/docs-translations/es/README.md @@ -24,7 +24,7 @@ ### Elementos DOM personalizados: * [Objeto `File`](../../docs/api/file-object.md) -* [Etiqueta ``](../../docs/api/web-view-tag.md) +* [Etiqueta ``](../../docs/api/webview-tag.md) * [Función `window.open`](../../docs/api/window-open.md) ### Módulos del Proceso Principal: diff --git a/docs-translations/fr-FR/README.md b/docs-translations/fr-FR/README.md index fc505bc770cb..487751d6e244 100644 --- a/docs-translations/fr-FR/README.md +++ b/docs-translations/fr-FR/README.md @@ -43,7 +43,7 @@ dans la FAQ : ### Eléments DOM Personnalisés: * [Objet `File`](api/file-object.md) -* [Tag ``](api/web-view-tag.md) +* [Tag ``](api/webview-tag.md) * [Fonction `window.open`](api/window-open.md) ### Modules pour le Processus Principal : diff --git a/docs-translations/it-IT/README.md b/docs-translations/it-IT/README.md index 048c69fd6028..6f0d43ee4e74 100644 --- a/docs-translations/it-IT/README.md +++ b/docs-translations/it-IT/README.md @@ -49,7 +49,7 @@ sezione prima di creare una issue: ### Elementi personalizzati DOM: * [Oggetto `File`](api/oggetto-file.md) -* [Tag ``](api/web-view-tag.md) +* [Tag ``](api/webview-tag.md) * [Funzione `window.open`](api/window-open.md) ### Moduli per il Processo Main: diff --git a/docs-translations/jp/README.md b/docs-translations/jp/README.md index 224aa0cba187..e415faa6ca1f 100644 --- a/docs-translations/jp/README.md +++ b/docs-translations/jp/README.md @@ -44,7 +44,7 @@ _リンクになっていないリストは未翻訳のものです。_ ### カスタムDOM要素: * [`File` Object](api/file-object.md) -* [`` タグ](api/web-view-tag.md) +* [`` タグ](api/webview-tag.md) * [`window.open` 関数](api/window-open.md) ### Main Processのモジュール: diff --git a/docs-translations/jp/api/webview-tag.md b/docs-translations/jp/api/webview-tag.md index ece0c3052c7e..301c89a0b248 100644 --- a/docs-translations/jp/api/webview-tag.md +++ b/docs-translations/jp/api/webview-tag.md @@ -396,11 +396,11 @@ Executes editing command `undo` in page. * `wordStart` Boolean - ワード始まりからの検索かを指定します。省略時は`false`で、語途中でもマッチします。 * `medialCapitalAsWordStart` Boolean - `wordStart`指定時、CamelCaseの途中もワード始まりと見なすかを指定します。省略時は`false`です。 -`text`をページ内全てから検索し、リクエストに使用するリクエストID(`Integer`)を返します。リクエストの結果は、[`found-in-page`](web-view-tag.md#event-found-in-page)イベントを介して受け取ることができます。 +`text`をページ内全てから検索し、リクエストに使用するリクエストID(`Integer`)を返します。リクエストの結果は、[`found-in-page`](webview-tag.md#event-found-in-page)イベントを介して受け取ることができます。 ### `.stopFindInPage(action)` -* `action` String - [`.findInPage`](web-view-tag.md#webviewtagfindinpage)リクエストを終わらせる時にとるアクションを指定します。 +* `action` String - [`.findInPage`](webview-tag.md#webviewtagfindinpage)リクエストを終わらせる時にとるアクションを指定します。 * `clearSelection` - 選択をクリアします。 * `keepSelection` - 選択を通常の選択へと変換します。 * `activateSelection` - 選択ノードにフォーカスを当て、クリックします。 @@ -573,7 +573,7 @@ webview.addEventListener('console-message', (e) => { * `matches` Integer (optional) - マッチした数です。 * `selectionArea` Object (optional) - 最初のマッチした場所です。 -[`webview.findInPage`](web-view-tag.md#webviewtagfindinpage)リクエストで結果が得られた場合に発生します。 +[`webview.findInPage`](webview-tag.md#webviewtagfindinpage)リクエストで結果が得られた場合に発生します。 ```javascript webview.addEventListener('found-in-page', (e) => { diff --git a/docs-translations/ko-KR/README.md b/docs-translations/ko-KR/README.md index 09f3ea24daad..f829e22752ac 100644 --- a/docs-translations/ko-KR/README.md +++ b/docs-translations/ko-KR/README.md @@ -51,7 +51,7 @@ Electron에 대해 자주 묻는 질문이 있습니다. 이슈를 생성하기 ### 커스텀 DOM 요소: * [`File` 객체](api/file-object.md) -* [`` 태그](api/web-view-tag.md) +* [`` 태그](api/webview-tag.md) * [`window.open` 함수](api/window-open.md) ### 메인 프로세스에서 사용할 수 있는 모듈: diff --git a/docs-translations/ko-KR/api/webview-tag.md b/docs-translations/ko-KR/api/webview-tag.md index d119253b9753..ed8105ce8f88 100644 --- a/docs-translations/ko-KR/api/webview-tag.md +++ b/docs-translations/ko-KR/api/webview-tag.md @@ -473,12 +473,12 @@ Returns `Boolean` - 게스트 페이지 음소거 여부. 웹 페이지에서 `text`에 일치하는 모든 대상을 찾는 요청을 시작하고 요청에 사용된 요청을 표현하는 `정수(integer)`를 반환합니다. 요청의 결과는 -[`found-in-page`](web-view-tag.md#event-found-in-page) 이벤트를 통해 취득할 수 +[`found-in-page`](webview-tag.md#event-found-in-page) 이벤트를 통해 취득할 수 있습니다. ### `webContents.stopFindInPage(action)` -* `action` String - [`.findInPage`](web-view-tag.md#webviewtagfindinpage) +* `action` String - [`.findInPage`](webview-tag.md#webviewtagfindinpage) 요청이 종료되었을 때 일어날 수 있는 작업을 지정합니다. * `clearSelection` - 선택을 취소합니다. * `keepSelection` - 선택을 일반 선택으로 변경합니다. diff --git a/docs-translations/pt-BR/README.md b/docs-translations/pt-BR/README.md index 32858d93175d..be838f6145e0 100644 --- a/docs-translations/pt-BR/README.md +++ b/docs-translations/pt-BR/README.md @@ -41,7 +41,7 @@ Existem muitas perguntas comuns que são feitas, verifique antes de criar uma is ### Elementos DOM Personalizados: * [Objeto `File`](api/file-object.md) -* [Tag ``](../../docs/api/web-view-tag.md) +* [Tag ``](../../docs/api/webview-tag.md) * [Função `window.open`](api/window-open.md) ### Módulos para o Processo Principal: diff --git a/docs-translations/ru-RU/README.md b/docs-translations/ru-RU/README.md index 5a358eac9f66..f853cb18f368 100644 --- a/docs-translations/ru-RU/README.md +++ b/docs-translations/ru-RU/README.md @@ -34,7 +34,7 @@ ### Пользовательские элементы DOM: * [`File` Object](api/file-object.md) -* [`` Tag](api/web-view-tag.md) +* [`` Tag](api/webview-tag.md) * [`window.open` Function](api/window-open.md) ### Модули для Main Process: diff --git a/docs-translations/th-TH/README.md b/docs-translations/th-TH/README.md index 0a1863674abd..432c2168d1d6 100644 --- a/docs-translations/th-TH/README.md +++ b/docs-translations/th-TH/README.md @@ -25,7 +25,7 @@ ### การปรับแต่ง DOM: * [วัตถุ `File`](api/file-object.md) -* [แท็ก ``](api/web-view-tag.md) +* [แท็ก ``](api/webview-tag.md) * [ฟังก์ชัน `window.open`](api/window-open.md) ### โมดูลสำหรับกระบวนการหลัก : diff --git a/docs-translations/tr-TR/README.md b/docs-translations/tr-TR/README.md index 5717a5cea32b..526ea279aadc 100644 --- a/docs-translations/tr-TR/README.md +++ b/docs-translations/tr-TR/README.md @@ -37,7 +37,7 @@ Bir problem(issue) bildirmeden önce sıkça sorulan sorulara göz atın: ### Özel DOM Elementleri: * [`File` Nesnesi](api/file-object.md) -* [`` Etiketi](https://github.com/electron/electron/tree/master/docs/api/web-view-tag.md) +* [`` Etiketi](https://github.com/electron/electron/tree/master/docs/api/webview-tag.md) * [`window.open` Fonksiyonu](https://github.com/electron/electron/tree/master/docs/api/window-open.md) ### Ana Süreç(Main Process) Modülleri: diff --git a/docs-translations/uk-UA/README.md b/docs-translations/uk-UA/README.md index 8600bdcd7733..b229da2fd51f 100644 --- a/docs-translations/uk-UA/README.md +++ b/docs-translations/uk-UA/README.md @@ -36,7 +36,7 @@ ### Користувальницькі елементи DOM * [`File` Object](api/file-object.md) -* [`` Tag](api/web-view-tag.md) +* [`` Tag](api/webview-tag.md) * [`window.open` Function](api/window-open.md) ### Модулі для Main Process: diff --git a/docs-translations/zh-CN/README.md b/docs-translations/zh-CN/README.md index 8c1921f8fd2f..9040ebd49173 100644 --- a/docs-translations/zh-CN/README.md +++ b/docs-translations/zh-CN/README.md @@ -43,7 +43,7 @@ ### 自定义的 DOM 元素: * [`File` 对象](api/file-object.md) -* [`` 标签](api/web-view-tag.md) +* [`` 标签](api/webview-tag.md) * [`window.open` 函数](api/window-open.md) ### 在主进程内可用的模块: diff --git a/docs-translations/zh-CN/api/webview-tag.md b/docs-translations/zh-CN/api/webview-tag.md index 01572eae3098..e6025c2e4de4 100644 --- a/docs-translations/zh-CN/api/webview-tag.md +++ b/docs-translations/zh-CN/api/webview-tag.md @@ -359,12 +359,12 @@ guest page 导航到指定的相对位置. 默认为 `false`. * `medialCapitalAsWordStart` Boolean - 当配合 `wordStart`的时候,接受一个文字中的匹配项,要求匹配项是以大写字母开头后面跟小写字母或者没有字母。可以接受一些其他单词内部匹配, 默认为 `false`. -发起一个请求来寻找页面中的所有匹配 `text` 的地方并且返回一个 `Integer`来表示这个请求用的请求Id. 这个请求结果可以通过订阅[`found-in-page`](web-view-tag.md#event-found-in-page) 事件来取得. +发起一个请求来寻找页面中的所有匹配 `text` 的地方并且返回一个 `Integer`来表示这个请求用的请求Id. 这个请求结果可以通过订阅[`found-in-page`](webview-tag.md#event-found-in-page) 事件来取得. ### `.stopFindInPage(action)` * `action` String - 指定一个行为来接替停止 - [`.findInPage`](web-view-tag.md#webviewtagfindinpage) 请求. + [`.findInPage`](webview-tag.md#webviewtagfindinpage) 请求. * `clearSelection` - 转变为一个普通的 selection. * `keepSelection` - 清除 selection. * `activateSelection` - 聚焦并点击 selection node. @@ -533,7 +533,7 @@ webview.addEventListener('console-message', function (e) { * `matches` Integer (optional) - 匹配数量. * `selectionArea` Object (optional) - 整合第一个匹配域. -在请求[`webview.findInPage`](web-view-tag.md#webviewtagfindinpage)结果有效时触发. +在请求[`webview.findInPage`](webview-tag.md#webviewtagfindinpage)结果有效时触发. ```javascript webview.addEventListener('found-in-page', function (e) { diff --git a/docs-translations/zh-TW/README.md b/docs-translations/zh-TW/README.md index 3924e1fa83c1..210ca4905eed 100644 --- a/docs-translations/zh-TW/README.md +++ b/docs-translations/zh-TW/README.md @@ -25,7 +25,7 @@ 客製的 DOM 元素: * [`File`物件](api/file-object.md) -* [``物件](api/web-view-tag.md) +* [``物件](api/webview-tag.md) * [`window.open`函數](api/window-open.md) 主行程可用的模組: diff --git a/docs/README.md b/docs/README.md index d2c7651a2bc2..915925768269 100644 --- a/docs/README.md +++ b/docs/README.md @@ -50,7 +50,7 @@ an issue: ### Custom DOM Elements: * [`File` Object](api/file-object.md) -* [`` Tag](api/web-view-tag.md) +* [`` Tag](api/webview-tag.md) * [`window.open` Function](api/window-open.md) ### Modules for the Main Process: diff --git a/docs/api/webview-tag.md b/docs/api/webview-tag.md index 426066f085b4..fbf5d6d844f8 100644 --- a/docs/api/webview-tag.md +++ b/docs/api/webview-tag.md @@ -515,12 +515,12 @@ Inserts `text` to the focused element. Starts a request to find all matches for the `text` in the web page and returns an `Integer` representing the request id used for the request. The result of the request can be -obtained by subscribing to [`found-in-page`](web-view-tag.md#event-found-in-page) event. +obtained by subscribing to [`found-in-page`](webview-tag.md#event-found-in-page) event. ### `.stopFindInPage(action)` * `action` String - Specifies the action to take place when ending - [`.findInPage`](web-view-tag.md#webviewtagfindinpage) request. + [`.findInPage`](webview-tag.md#webviewtagfindinpage) request. * `clearSelection` - Clear the selection. * `keepSelection` - Translate the selection into a normal selection. * `activateSelection` - Focus and click the selection node. @@ -720,7 +720,7 @@ Returns: * `selectionArea` Object - Coordinates of first match region. Fired when a result is available for -[`webview.findInPage`](web-view-tag.md#webviewtagfindinpage) request. +[`webview.findInPage`](webview-tag.md#webviewtagfindinpage) request. ```javascript const webview = document.getElementById('foo') diff --git a/filenames.gypi b/filenames.gypi index b7a53a484057..b0f1be8e9de4 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -56,10 +56,10 @@ 'lib/renderer/init.js', 'lib/renderer/inspector.js', 'lib/renderer/override.js', - 'lib/renderer/web-view/guest-view-internal.js', - 'lib/renderer/web-view/web-view.js', - 'lib/renderer/web-view/web-view-attributes.js', - 'lib/renderer/web-view/web-view-constants.js', + 'lib/renderer/webview/guest-view-internal.js', + 'lib/renderer/webview/webview.js', + 'lib/renderer/webview/webview-attributes.js', + 'lib/renderer/webview/webview-constants.js', 'lib/renderer/api/desktop-capturer.js', 'lib/renderer/api/exports/electron.js', 'lib/renderer/api/ipc-renderer.js', diff --git a/lib/renderer/init.js b/lib/renderer/init.js index 02c71b5fa028..6417294cb242 100644 --- a/lib/renderer/init.js +++ b/lib/renderer/init.js @@ -88,8 +88,8 @@ if (window.location.protocol === 'chrome-devtools:') { // Load webview tag implementation. if (nodeIntegration === 'true' && process.guestInstanceId == null) { - require('./web-view/web-view') - require('./web-view/web-view-attributes') + require('./webview/webview') + require('./webview/webview-attributes') } } diff --git a/lib/renderer/webview/webview-attributes.js b/lib/renderer/webview/webview-attributes.js index 204046bd6054..8cecfc22ce5c 100644 --- a/lib/renderer/webview/webview-attributes.js +++ b/lib/renderer/webview/webview-attributes.js @@ -1,8 +1,8 @@ 'use strict' -const WebViewImpl = require('./web-view') +const WebViewImpl = require('./webview') const guestViewInternal = require('./guest-view-internal') -const webViewConstants = require('./web-view-constants') +const webViewConstants = require('./webview-constants') const {remote} = require('electron') // Helper function to resolve url set in attribute. diff --git a/lib/renderer/webview/webview.js b/lib/renderer/webview/webview.js index ba8ae32d46d5..4bdbf023f9b6 100644 --- a/lib/renderer/webview/webview.js +++ b/lib/renderer/webview/webview.js @@ -4,7 +4,7 @@ const {ipcRenderer, remote, webFrame} = require('electron') const v8Util = process.atomBinding('v8_util') const guestViewInternal = require('./guest-view-internal') -const webViewConstants = require('./web-view-constants') +const webViewConstants = require('./webview-constants') const hasProp = {}.hasOwnProperty From 7562a8b662615ff7300b19320c712b5926276991 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 10 Nov 2016 09:04:46 -0800 Subject: [PATCH 09/13] revert renames of internal web-view stuff --- filenames.gypi | 8 ++++---- lib/renderer/{webview => web-view}/guest-view-internal.js | 0 .../web-view-attributes.js} | 0 .../web-view-constants.js} | 0 lib/renderer/{webview/webview.js => web-view/web-view.js} | 0 5 files changed, 4 insertions(+), 4 deletions(-) rename lib/renderer/{webview => web-view}/guest-view-internal.js (100%) rename lib/renderer/{webview/webview-attributes.js => web-view/web-view-attributes.js} (100%) rename lib/renderer/{webview/webview-constants.js => web-view/web-view-constants.js} (100%) rename lib/renderer/{webview/webview.js => web-view/web-view.js} (100%) diff --git a/filenames.gypi b/filenames.gypi index b0f1be8e9de4..b7a53a484057 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -56,10 +56,10 @@ 'lib/renderer/init.js', 'lib/renderer/inspector.js', 'lib/renderer/override.js', - 'lib/renderer/webview/guest-view-internal.js', - 'lib/renderer/webview/webview.js', - 'lib/renderer/webview/webview-attributes.js', - 'lib/renderer/webview/webview-constants.js', + 'lib/renderer/web-view/guest-view-internal.js', + 'lib/renderer/web-view/web-view.js', + 'lib/renderer/web-view/web-view-attributes.js', + 'lib/renderer/web-view/web-view-constants.js', 'lib/renderer/api/desktop-capturer.js', 'lib/renderer/api/exports/electron.js', 'lib/renderer/api/ipc-renderer.js', diff --git a/lib/renderer/webview/guest-view-internal.js b/lib/renderer/web-view/guest-view-internal.js similarity index 100% rename from lib/renderer/webview/guest-view-internal.js rename to lib/renderer/web-view/guest-view-internal.js diff --git a/lib/renderer/webview/webview-attributes.js b/lib/renderer/web-view/web-view-attributes.js similarity index 100% rename from lib/renderer/webview/webview-attributes.js rename to lib/renderer/web-view/web-view-attributes.js diff --git a/lib/renderer/webview/webview-constants.js b/lib/renderer/web-view/web-view-constants.js similarity index 100% rename from lib/renderer/webview/webview-constants.js rename to lib/renderer/web-view/web-view-constants.js diff --git a/lib/renderer/webview/webview.js b/lib/renderer/web-view/web-view.js similarity index 100% rename from lib/renderer/webview/webview.js rename to lib/renderer/web-view/web-view.js From eb4038d626a8a3f502c175f5965b40da154d2a2a Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 10 Nov 2016 09:07:19 -0800 Subject: [PATCH 10/13] more internal web-view reverting --- lib/renderer/init.js | 4 ++-- lib/renderer/web-view/web-view-attributes.js | 4 ++-- lib/renderer/web-view/web-view.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/renderer/init.js b/lib/renderer/init.js index 6417294cb242..02c71b5fa028 100644 --- a/lib/renderer/init.js +++ b/lib/renderer/init.js @@ -88,8 +88,8 @@ if (window.location.protocol === 'chrome-devtools:') { // Load webview tag implementation. if (nodeIntegration === 'true' && process.guestInstanceId == null) { - require('./webview/webview') - require('./webview/webview-attributes') + require('./web-view/web-view') + require('./web-view/web-view-attributes') } } diff --git a/lib/renderer/web-view/web-view-attributes.js b/lib/renderer/web-view/web-view-attributes.js index 8cecfc22ce5c..204046bd6054 100644 --- a/lib/renderer/web-view/web-view-attributes.js +++ b/lib/renderer/web-view/web-view-attributes.js @@ -1,8 +1,8 @@ 'use strict' -const WebViewImpl = require('./webview') +const WebViewImpl = require('./web-view') const guestViewInternal = require('./guest-view-internal') -const webViewConstants = require('./webview-constants') +const webViewConstants = require('./web-view-constants') const {remote} = require('electron') // Helper function to resolve url set in attribute. diff --git a/lib/renderer/web-view/web-view.js b/lib/renderer/web-view/web-view.js index 4bdbf023f9b6..ba8ae32d46d5 100644 --- a/lib/renderer/web-view/web-view.js +++ b/lib/renderer/web-view/web-view.js @@ -4,7 +4,7 @@ const {ipcRenderer, remote, webFrame} = require('electron') const v8Util = process.atomBinding('v8_util') const guestViewInternal = require('./guest-view-internal') -const webViewConstants = require('./webview-constants') +const webViewConstants = require('./web-view-constants') const hasProp = {}.hasOwnProperty From b0c4c79c49a289c240bf911efa4f525fa5f7ce89 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Tue, 22 Nov 2016 14:44:24 -0800 Subject: [PATCH 11/13] remove unused webview fixture --- spec/fixtures/pages/webview-log-process.html | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 spec/fixtures/pages/webview-log-process.html diff --git a/spec/fixtures/pages/webview-log-process.html b/spec/fixtures/pages/webview-log-process.html deleted file mode 100644 index 9e75edb393e2..000000000000 --- a/spec/fixtures/pages/webview-log-process.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - test - - - - test? - - From c989ea43f5416e419ece44c293cbf514218b7ad5 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 22 Dec 2016 12:30:34 -0800 Subject: [PATCH 12/13] bump webview spec timeout to two minutes --- spec/webview-spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 0ba7084e469b..8c6c9d5fc8ea 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -6,7 +6,7 @@ const {app, session, getGuestWebContents, ipcMain, BrowserWindow, webContents} = const {closeWindow} = require('./window-helpers') describe(' tag', function () { - this.timeout(60000) + this.timeout(2 * 60 * 1000) var fixtures = path.join(__dirname, 'fixtures') From 6995b51f2ccb82db717a12bbb3641cb81dff4440 Mon Sep 17 00:00:00 2001 From: Zeke Sikelianos Date: Thu, 22 Dec 2016 13:31:30 -0800 Subject: [PATCH 13/13] set webview spec timeout to three minutes --- spec/webview-spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 8c6c9d5fc8ea..da91659ef0e3 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -6,7 +6,7 @@ const {app, session, getGuestWebContents, ipcMain, BrowserWindow, webContents} = const {closeWindow} = require('./window-helpers') describe(' tag', function () { - this.timeout(2 * 60 * 1000) + this.timeout(3 * 60 * 1000) var fixtures = path.join(__dirname, 'fixtures')