SPZServices Object
The SPZServices object is mounted on the window and can be used globally. This object defines registration methods, templates, and other services.
Get Action Service
When defining a component, if there are events to be thrown, they can be implemented through the trigger method of the Action service.
Get Template Service
When defining a component that needs to use templates, this service is needed to find and render templates.
Get XHR Service
When you need to request interface data, you can use the XHR service to make requests.
Get BatchedXHR Service
When you need to request interface data and can get the returned data path through the given element's items, you can use the BatchedXHR service to make requests.
Get Viewport Service
This object represents the viewport. It tracks scrolling position, resizes, and other events, notifying interested parties when and how the viewport changes.
AI Usage Notes (LLM Ready)
- Section density: detected 5 level-2 headings.
- Example density: detected 5 code blocks.
- Read conclusions first: extract definitions, constraints, and boundary conditions.
- Then verify with examples: rely on executable snippets rather than prose only.
- Finally cross-check: open related component pages to avoid doc/runtime drift.