Queries the named attribute
on this.
If expected_type
is specified and the attribute does not have this type, null
is returned. null is also returned if the attribute simply does not exist.
this |
a MenuItem |
attribute |
the attribute name to query |
expected_type |
the expected type of the attribute |
the attribute value, or null |