GuiRemoveAttribute: Difference between revisions

From Wiki G1R-MP G1 Remake Multiplayer
Jump to navigation Jump to search
Automatyczna aktualizacja dokumentacji funkcji
 
Complete Lua function catalog
 
Line 32: Line 32:
* The same safe-name policy as <code>guiSetAttribute</code> is applied.
* The same safe-name policy as <code>guiSetAttribute</code> is applied.


[[Category:Lua Functions]]
[[Category:Client Functions]]
[[Category:Client Functions]]
[[Category:GUI Functions]]
[[Category:GUI Functions]]

Latest revision as of 09:54, 15 August 2026

guiRemoveAttribute

Removes a safe attribute from an element in a loaded RML document.

Syntax

bool guiRemoveAttribute(DocumentHandle document, string elementId, string name)

Parameters

Name Type Required Description
document DocumentHandle yes The owning RML document handle.
elementId string yes The target element's id attribute.
name string yes The safe attribute name to remove.

Returns

Returns true when the target element exists and the removal is performed; otherwise returns false.

Examples

Clear a custom data attribute:

guiRemoveAttribute(window, "character-panel", "data-role")

Notes

  • Available only in client-side resource scripts.
  • The same safe-name policy as guiSetAttribute is applied.