Instruction set reference
HIPE_OP_SET_ATTRIBUTE
Sets an HTML attribute for a particular tag element.
- location: The HTML tag element to set the attribute on.
- arg[0]: The attribute name.
- arg[1]: The attribute value string.
Notes
Any attribute can be set, except hipe-loc, which only has a meaning in markup (see "Locations"). An invalid attribute name is ignored.
These attributes have an instruction of their own that suits them better:
| Attribute | Instead use | Because |
|---|---|---|
| class | HIPE_OP_TOGGLE_CLASS, or arg[2] of HIPE_OP_APPEND_TAG and HIPE_OP_INSERT_TAG | It adds or removes one class. Setting class replaces all of the element's classes. |
| style | HIPE_OP_SET_STYLE | It sets one property. Setting style replaces all of the element's inline styles. |
| src | HIPE_OP_SET_SRC | It sends the file's data, in parts if it is large. src loads only a data: URL. |
| href | HIPE_OP_OPEN_LINK | Nothing in a Hipe frame navigates. HIPE_OP_OPEN_LINK hands a link to the user's environment. |
| onclick, onkeydown and other event attributes | HIPE_OP_EVENT_REQUEST | No scripts run. |
