NamedNodeMap

Summary

Represents a collection of an element's attributes, exposing DOM-like attribute manipulation methods and C# DynamicObject member dispatch with camelCase to kebab-case conversion.

Remarks

Danger

All calls made within this class MUST be performed on the Master Thread. See Threads.RunLater on how to safely call this from an asynchronous thread. Failure to comply with this can cause catastrophical failures as the engine is not designed for this.

Definition

Namespace: SDT4.Managed.UI.Rml
Assembly: SDT4.Managed.UI.dll

sealed class NamedNodeMap
Inheritance:

Object ➔ DynamicObject ➔ NamedNodeMap

Implements:

IDynamicMetaObjectProvider, IEnumerable<KeyValuePair<String, RmlVariant>>, IEnumerable

Fields

Name Type Description

Properties

Name Type Description
public get; Length Int32 Gets the total number of attributes present on the element. Corresponds to JavaScript element.attributes.length.
public get; set; Item RmlVariant Indexed accessor for attributes by name.
public get; Item KeyValuePair<String, RmlVariant> Indexed accessor for attributes by zero-based index, mirroring JS array indexing on NamedNodeMap.

Methods

public KeyValuePair<String, RmlVariant> GetItem(Int32 index)

Summary: Retrieves an attribute pair by its zero-based index. Corresponds to JavaScript element.attributes.item(index).

Parameters:

Returns:


public virtual Boolean TryGetMember(GetMemberBinder binder, out Object result)

Summary: Provides dynamic property retrieval, converting PascalCase/camelCase properties into kebab-case attribute names.

Parameters:

Returns:


public virtual Boolean TrySetMember(SetMemberBinder binder, Object? value)

Summary: Provides dynamic property assignment, converting PascalCase/camelCase properties into kebab-case attribute names.

Parameters:

Returns:


public IEnumerator<KeyValuePair<String, RmlVariant>> GetEnumerator()

Summary: Returns an enumerator that iterates through all attributes on the element.

Returns:


public virtual String ToString()

Returns: