Template
This page documents the Template CDP domain supported by Lynx DevTool.
Experimental reference
This generated reference is still being completed.
- CDP events are not included yet.
- Some Lynx extensions are listed but do not yet have detailed documentation.
- Method descriptions are not automatically verified against the implementation and may be incomplete or inaccurate.
Verify behavior against the implementation and the linked upstream CDP reference before relying on it.
Overview
- Scope:
instance - CDP domain: Lynx-specific
Lynx Extensions
Template.getTemplateJs
Returns a base64-encoded slice of saved template binary bytes.
- Origin:
lynx-extension - Source:
devtool/lynx_devtool/agent/domain_agent/inspector_template_agent.cc
Parameters
Returns
Notes
- Dispatches through LynxDevToolMediator to InspectorUIExecutor on the UI thread.
- params.offset and params.size are required. If either field is missing, the method returns a CDP error with message Params must have offset and size properties.
- The native executor reads offset and size as unsigned integers; callers should pass non-negative integers.
- Android returns a base64 slice from the saved binary template data or the bytes captured after a URL template load. The slice length is clamped to the remaining template bytes.
- The generic embedder implementation returns an empty data string.
Examples
Read a template byte range
Request:
Response:
Template.templateApi
Reports template data processor API information for the current template.
- Origin:
lynx-extension - Source:
devtool/lynx_devtool/agent/domain_agent/inspector_template_agent.cc
Parameters
No parameters.
Returns
Notes
- Dispatches through LynxDevToolMediator to InspectorTasmExecutor on the TASM thread.
- When TASM is unavailable, the result reports useDefault as false.
Examples
Get template processor API info
Request:
Response:
Template.templateConfigInfo
Compatibility method for removed template config info support.
- Origin:
lynx-extension - Source:
devtool/lynx_devtool/agent/domain_agent/inspector_template_agent.cc
Parameters
No parameters.
Returns
Notes
- This method does not call the mediator or platform facade.
- The response result is an empty string, not an object, because config info support was removed.
Examples
Get removed template config info
Request:
Response:
Template.templateData
Returns the current initial template data exposed by the platform facade.
- Origin:
lynx-extension - Source:
devtool/lynx_devtool/agent/domain_agent/inspector_template_agent.cc
Parameters
No parameters.
Returns
Notes
- Dispatches through LynxDevToolMediator to InspectorUIExecutor on the UI thread.
- Android reads the saved initial TemplateData pointer from the platform reload helper; Darwin delegates to the platform implementation.
- If the platform facade has no template data value, the result object is returned without content.
Examples
Get current template data
Request:
Response: