W3C home > Mailing lists > Public > www-style@w3.org > May 2014

Re: Styling of search/find-in-page results

From: Mitar <mmitar@gmail.com>
Date: Sat, 10 May 2014 02:05:23 -0700
Message-ID: <CAKLmikPV1oZrXNmyGNBAW_n3_jW3mXK5jE8kQqzXzacLLk=eaQ@mail.gmail.com>
To: Kornel Lesiński <kornel@geekhood.net>
Cc: www-style list <www-style@w3.org>

On Sat, Apr 5, 2014 at 7:58 AM, Kornel Lesiński <kornel@geekhood.net> wrote:
> Perhaps this and the other issue you've raised about lack of integration with the UI[1] could be solved together?
> e.g. when user invokes search the browser fires an event and then page can respond with a list of DOM nodes (or bounding boxes?) of things that match the search:
> document.addEventListener('find', function(event){
>     myDocumentSearch(event.findInPageRegEx).then(event.setSearchResultsCallback);
> });
> If you could tell browser what matches the search, then you wouldn't need to set highlighting style yourself — the browser would know how to render it in a way expected by the user.

The issue with this approach is that DOM might change after the search
is invoked. So you have also to tell the browser back that it should
rerun/update search.

But this still doesn't address style issues.


Received on Saturday, 10 May 2014 09:05:50 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:42 UTC