CustomWebView : An extended form of Web Viewer

Ohhhhh ok, now I have the solution. Sorry for any bothering, thx for making the extension

Kindly show what you have tried.

Of course that’s what it should do.
Whenever you see a js alert on browser you need to dismiss that in order to continue browsing.The case is similar with file upload prompt.
Either you need to upload a file or dismiss the request.

Would it be possible for me to edit a value from my site?
Example: In kodular I have a number 40 and I want to put this number in an input to receive this value!
Would that be possible?

You mean autofill?

1 Like

I got exactly what I wanted.

Three questions came up…
1 - How do I get the id of this html?

Text

div role=“button” data-button="" data-funding-source=“card” class=“paypal-button paypal-button-number-1 paypal-button-layout-vertical paypal-button-shape-rect paypal-button-number-multiple paypal-button-env-sandbox paypal-button-color-black paypal-button-text-color-white paypal-logo-color-white " tabindex=“0” aria-label=“Cartão de Débito ou Crédito”>div class=“paypal-button-label-container”>img src=“data:image” alt=”" class=“paypal-logo-card paypal-logo-card-”>span class=“paypal-button-space” data-v-e6f98a5a=""> /span>span class=“paypal-button-text true” optional="" data-v-e6f98a5a="">Cartão de Débito ou Crédito/span>/div>div class=“paypal-button-spinner”>/div>/div>

2 - The code has an “onClick: function” that opens a popup when clicked to confirm, how do I put it? It is already in the code, I just want to make it appear.

3 - How can I eliminate the blank space in the webview?
Ex: The webview consumes 50% of height, but my code consumes only 20%.

For this search in the community.

Refer to this guide:

You will have to adjust the height of container in which webview has been created.

How To Get Text From web page and show it using the label, using Customwebview Extension?

Example:


image

:heart_eyes:

Execute java script through web viewer document.getElementById() or document.getElementByClass() with he parameter of element Id or class.

3 Likes

Thank You Very Much ! Is there any block example for it :heart_eyes:

Notifire is Showing Null

You will have to pass it through app inventor web view string. You can inspect the elements and their Ids/tags/classes and get the text by (.innerHTML).

Take a look at the below guide from the AppInventor community:

You can’t pass a JavaScript object to Java.
You can only pass some limited types such as string , integer , boolean.

Also have you searched your query in this thread?

1 Like

Thanks, xoma for your support :pray: :pray: I will try!

Um. I searched lot of time by I have not found any proper answer yet!

(Anyway customwebview is a Nice extension :sparkler::sparkler:)

I am too lazy to go through 1228 posts so you can just run any one of the below queries:

document.getElementById('element-id').innerText;
document.getElementById('element-id').outerText;
document.getElementById('element-id').textContent;
1 Like

Oh, Thank You Very Much! It Worked !! :heart: :heart: :heart: :heart:

Here is v11:

3 Likes

I think we need to remove old version of extension from project then import this new one :thinking:

As I am trying to import it but it is failing

1 Like

Yes, naming changes break a lot of things.
But thanks to backpack blocks are recoverable.

1 Like

Sunny, I hope everything is fine with you

With the Kodular update, the extension started to present problems when it is in portrait mode (in landscape it apparently works normally).

It’s important to say that the problem doesn’t happen with all websites.

I have a video and games application, and the problem happens when I open both games ans videos.

But on the main youtube screen the problem is not so visible.

For information, today I installed version 11 of the extension and the problem remains.

Are there any plans to update the extension, which is fantastic, so that it works correctly again?




The problem is actually with Kodular’s recent update.
All webview related extensions will show same behaviour.
Kindly refer to this thread:
https://community.kodular.io/t/kodular-fenix-bug-tracker/132454/2

3 Likes