Page Speed Optimization Libraries  1.11.33.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Attributes | List of all members
net_instaweb::AddIdsFilter Class Reference

#include "add_ids_filter.h"

Inheritance diagram for net_instaweb::AddIdsFilter:

Public Member Functions

 AddIdsFilter (RewriteDriver *driver)
 
virtual void StartDocument ()
 
virtual void StartElement (HtmlElement *element)
 
virtual void EndElement (HtmlElement *element)
 
virtual const char * Name () const
 

Static Public Attributes

static const char kIdPrefix []
 

Detailed Description

This filter as it stands adds an id to all div-like DOM elements that lack one. The ids represent the div's location in the DOM, based on the tag structure of the page. The hope is that this is moderately stable between page accesses.

Ids are of the form PageSpeed-nearestParentId-n-n-n... where -n-n-n is a path encoded as a series of indexes at that depth below nearestParentId. For example: PageSpeed-7-0 : The 0th child of the 7th child of the root of the document PageSpeed-content-11: The 11th child of the node with id='content'.


The documentation for this class was generated from the following file: