Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOM Access and useful function #2064

Closed
amancini opened this issue Jan 7, 2022 · 1 comment
Closed

DOM Access and useful function #2064

amancini opened this issue Jan 7, 2022 · 1 comment
Labels
feature request feature request

Comments

@amancini
Copy link

amancini commented Jan 7, 2022

Hello
I use the WEBView with a Win32 application (created through Embarcadero Delphi)

I need to highlight some text from an HTML file that I generate, with the old WebBroser (internet explorer wrapper) I could access the DOM and change the style

How can I do with the WebView2?

Some Api would be very useful for accessing the DOM where you can call the getElementByID or similar

Furthermore, functions for exporting HTML are also very useful (to date I am forced to call javascript encodeURI (document.documentElement.outerHTML

and general functions such as

SelectAll
Copy
OpenPrintPreview
ClearSelection
FindText (even better if you could run the browser's default findDialog)

all functions currently implemented through Javascript

best regards

@amancini amancini added the feature request feature request label Jan 7, 2022
@champnic
Copy link
Member

champnic commented Jan 8, 2022

Hey @amancini - We are tracking DOM access and functions in #77. Right now the recommended way to do this is by injecting script with ExecuteScript. Thanks!

@champnic champnic closed this as completed Jan 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request
Projects
None yet
Development

No branches or pull requests

2 participants