Closes 41: 3.19 preconnect to external domains beacon processing part #43
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Closes wp-media/wp-rocket#7247
Collates all the external domains on a page.
Type of change
Detailed scenario
N/A
Technical description
Documentation
The
BeaconPreconnectExternalDomain
class is designed to identify and manage external domains referenced in specific HTML elements (like <script>, , etc.) based on a configuration that specifies which elements to consider and which patterns to exclude. It processes these elements to determine if they belong to external domains, logs matched and excluded items, and provides methods to retrieve the results of the matching process. The class utilizes URL parsing and pattern matching to filter out unwanted domains and attributes, ensuring that only relevant external domains are captured.New dependencies
N/A
Risks
N/A
Mandatory Checklist
Code validation
Code style
Unticked items justification
If some mandatory items are not relevant, explain why in this section.
Additional Checks