Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #62269


Ignore:
Timestamp:
10/21/2024 11:28:50 PM (18 months ago)
Author:
westonruter
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #62269 – Description

    initial v2  
    1 In the Optimization Detective plugin from the WordPress Performance team there is a need to compute a precise locator for each tag in a document beyond just what `get_breadcrumbs()` provides. In particular, there is a need to disambiguate between two tags which may be siblings of each other in which case `array( 'html', 'body', 'img' )` will be ambiguous. Currently we're using XPaths for this purpose, for example if there are three `IMG` tags appearing as siblings at the beginning of the `BODY`, their XPaths are computed as:
     1In the Optimization Detective plugin from the WordPress Core Performance Team there is a need to compute a precise locator for each tag in a document beyond just what `get_breadcrumbs()` provides. In particular, there is a need to disambiguate between two tags which may be siblings of each other in which case `array( 'html', 'body', 'img' )` will be ambiguous. Currently we're using XPaths for this purpose, for example if there are three `IMG` tags appearing as siblings at the beginning of the `BODY`, their XPaths are computed as:
    22
    33* `/*[1][self::HTML]/*[2][self::BODY]/*[1][self::IMG]`