Code Monkey home page Code Monkey logo

tablacusexplorerwebview2's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tablacusexplorerwebview2's Issues

mouse middle/right button are invalid when install the webview2

Before install the webview2, I can use mouse middle button to close the tab, but after install the webview2, these two button are failed.
before install, when I was try mouse gesture,1,2,3,8,9 will show; After install, it only can show 1,8,9; when I click right/middle button, it does not work.
2022-04-18_210917

スクリプト実行関連の問題点

問題点:Tablacus Explorer側からJavaScriptのオブジェクトを実行するとエラー

WebView2 クラス (CoreWebView2 クラス) に書いている通り

HRESULT_FROM_WIN32 (ERROR_POSSIBLE_DEADLOCK) で失敗します。

オブジェクトは AddHostObjectToScript で渡せるので、引数はオブジェクトで渡すことにして、ExecuteScriptAsync を実行すればなんとかならないかな。

2020-9-21追記
Blink側で非同期でオブジェクトを受け取ると 返り値は受け取れないが呼び出すことは可能であった。
async await 辺りを使って行くが、IEでエラーを出さないためにはどうすれば……

Tablacus Explorer blink化計画

1年くらいの長期計画で考えています。

現在、Tablacus Explorerのアドレスバー、ツールバー等はIEのレンダリングエンジンであるTridentを使っています。それを新Edge(Chromium)のレンダリングエンジンのBlinkを使う様にする計画です。表面的に何かが変わるかとかは正直やってみないとわかりません。

ドラッグ&ドロップの問題点など

WebView2ではマルチプロセスのため、ネイティブのIDropTargetを抜き出すのができなかった。
必要な場合はHTML5のドラッグ&ドロップAPIで補う必要がある。

配列関連の問題点など

要確認:Blinkの配列はVARIANTに入る際はVARIANTのSAFEARRAYになっている

※多分、VARIANTのSAFEARRAYはVBSの配列と同じ

逆にVARIANTのSAFEARRAYを渡すと配列として使える模様
Arrayオブジェクトはstd::vectorベースからSAFEARRAYを利用するものに作り直し

配列のtypeofはobject

Blink側で扱うのはSAFEARRAYが良さそうだけど、マルチスレッドとかまだActiveScript使わないとできなそうなので
そのあたりが課題

文字列関連の問題点など

文字列の受け渡しの際はNULL文字で切られてしまう

XMLHttpRequestのresponseBodyが無くなっているのでいろいろやっている際に気付いたんだけど、文字列の受け渡しの際はNULL文字で切られてしまう
XMLHttpRequestの方はbase64を活用することでしのぐことにしたが、
SHFileOperation でpFromに複数の項目をしていする際に \0 で区切るので2つ目から無効になってしまう。
これは配列渡しを可能にすることにする。

https://docs.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-shfileoperationa

Blink版Tablacus Explorerのからくり

Tablacus Explorerの実行ファイルではほぼ Trident用のインターフェイス IWebBrowser2 でブラウザ関連の操作を行っている。
Blink版Tablacus Explorerの肝である TablacusExplorerWebView2の DLL は IWebBrowser2 のフリをして内部ではChromium版 Edge のインターフェイス WebView2 を使って Trident の代わりに Blink を使用している。

Tablacus Explorer で 使っている IWebBrowser2 は限られているので、代行させてもそんなにオーバーヘッドにならないと思う。

進捗状況

2020-9-18

とりあえず、タブとリストは表示して移動できるようになったが、すぐに固まる。
image

Blinkと共用の為にスクリプトは UI用、同期用、共用の3つに分けている。
一気に置き換えるのは怖いので、配布用のスクリプトと上のBlinkプロジェクト用のスクリプトの2段構え。
実行ファイルの変更の方が問題ないようであればスクリプトも置き換えていく予定。
実行ファイルの方はTablacus Explorer 20.9.16からソースは同じだが、Debug版のみ動作するように作っているので別。
まだまだ作らなければならないものが多いので、先は長い。

オブジェクト(IDispatch)関連の問題点など

問題点:IDispatchEx が使われない

連想配列のオブジェクトで新規項目を追加しようとすると固まる。
オブジェクトはIDispatchだけでIDispatchExは使われない模様。
新規項目についてはIDispatchだけでなんとかする方法にできたけど、項目を削除するdelete ○○とかfor in ○○がTablacus Explorerのオブジェクトでは使えないくなってしまうのが問題

WSH関連のオブジェクトはIDispatchExを使っていないはずなので、その辺りは救い。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.