Browser Selection Mapping to Original HTML via DOM Differencing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current web development lacks an automated method to map browser selections back to the original HTML file received from a web server, especially after scripting languages modify the Document Object Model (DOM), making it difficult to track changes and maintain correspondence between the browser view and the original server-provided HTML.
Innovation Solution
Creating associations between the DOM tree and the original document fetched from the web server, using a differencing algorithm to compare changes in the HTML file and the DOM, and maintaining block lists with identical identifiers to map browser selections to the original file, even after scripting language execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If scripting languages are used to add interactive features to web pages, then the functionality and interactivity of the web page is improved, but the ability to map browser selections back to the original HTML file is lost
Solution Approach 1:
The patent applies preliminary action by creating and maintaining associations between the DOM tree and the original HTML file before scripting languages modify the DOM. Block lists are generated from both the original HTML and the modified DOM, and correspondences are established in advance, allowing selections to be mapped back to the original file even after scripting changes are applied.
2Adaptability or versatility
If scripting languages modify the DOM to add interactive features, then the web page functionality is enhanced, but the correspondence between the browser view and the original server-provided HTML is lost
Solution Approach 1:
The patent uses copying by creating block lists that represent copies of the HTML structure at different stages - the original HTML file and the modified DOM. By maintaining block lists from both versions and establishing correspondences between them, the system preserves the ability to trace selections back to the original server-provided HTML even after scripting modifications.
3Measurement precision
If automated mapping methods are implemented, then the ability to track changes is improved, but the system complexity increases
Solution Approach 1:
The patent applies segmentation by dividing the HTML document and DOM into discrete blocks, creating block lists that represent segmented versions of the document structure. This segmentation allows for precise tracking of changes and selections while managing complexity through modular representation of the document hierarchy.
Data Source
AI summary
A selection in a browser in an integrated development environment can be mapped back to the original document that was fetched from a web server by uniquely identifying elements in the original document. A DOM can be created from the original document where the DOM retains the unique identifiers associated with the elements. Block lists for the original document and the DOM can be created. A differencing algorithm can be run on the two block lists. A selection in a browser can be mapped to a location in the DOM block list and the location in the DOM block list can be mapped to the original document.


