mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:42:43 +00:00 
			
		
		
		
	 f07f5a2622
			
		
	
	
		f07f5a2622
		
	
	
	
	
		
			
			Attribute values may contain HTML, and may contain invalid HTML at that. If the latter occurs, let's not generate invalid Inspector HTML when we embed the attribute values as data attributes. Instead, cache the values in the InspectorClient, and embed just a lookup index into the HTML. This also nicely reduces the size of the generated HTML. The Inspector on https://github.com/SerenityOS/serenity reduces from 2.3MB to 1.9MB (about 318KB, or 13.8%).
		
			
				
	
	
		
			17 lines
		
	
	
	
		
			701 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			17 lines
		
	
	
	
		
			701 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #import <DOM/NamedNodeMap.idl>
 | |
| 
 | |
| [Exposed=Nobody] interface Inspector {
 | |
| 
 | |
|     undefined inspectorLoaded();
 | |
|     undefined inspectDOMNode(long nodeID, optional long pseudoElement);
 | |
| 
 | |
|     undefined setDOMNodeText(long nodeID, DOMString text);
 | |
|     undefined setDOMNodeTag(long nodeID, DOMString tag);
 | |
|     undefined addDOMNodeAttributes(long nodeID, NamedNodeMap attributes);
 | |
|     undefined replaceDOMNodeAttribute(long nodeID, unsigned long long attributeIndex, NamedNodeMap replacementAttributes);
 | |
| 
 | |
|     undefined requestDOMTreeContextMenu(long nodeID, long clientX, long clientY, DOMString type, DOMString? tag, unsigned long long? attributeIndex);
 | |
| 
 | |
|     undefined executeConsoleScript(DOMString script);
 | |
| 
 | |
| };
 |