Can I add an icon to <parameter> using WebKit?

I use WebView inside one of my programs, and there is a <select> inside the HTML page that I am viewing. I would like to add icons to the <option> elements that it contains, for example:

Screenshot of a dropdown list with icons

(There is no shadow effect, so it’s easy to overlook that this is a drop-down list, but there is one.)

Is it possible? All my efforts to create <option> tags or put images in them have so far failed.

Since it will not be displayed by another rendering engine, I only need to work with WebKit. I am also well versed in a solution that involves tricking WebView, and it will never work in a browser, although it would be nice if it worked in a browser too.

+4
source share
1 answer

This is not possible in webkit browsers using only css at this point in time. This is possible in Firefox, but not webkit.

You will need to use javascript to replace the select box with stylish elements.

The following audience answers this:
How to add images to your favorites list

0
source

Source: https://habr.com/ru/post/1448040/


All Articles