internal override bool HasOwnProperty(XMLName xmlName) { bool hasProperty = false; if (IsPrototype()) { string property = xmlName.LocalName(); hasProperty = (0 != FindPrototypeId(property)); } else { hasProperty = (GetPropertyList(xmlName).Length() > 0); } return hasProperty; }
internal virtual void SetAttribute(XMLName xmlName, object value) { if (!IsElement()) { throw new InvalidOperationException("Can only set attributes on elements."); } // TODO Is this legal, but just not "supported"? If so, support it. if (xmlName.Uri() == null && xmlName.LocalName().Equals("*")) { throw ScriptRuntime.TypeError("@* assignment not supported."); } this.node.SetAttribute(xmlName.ToQname(), ScriptRuntime.ToString(value)); }
internal override bool HasOwnProperty(XMLName xmlName) { if (IsPrototype()) { string property = xmlName.LocalName(); return (FindPrototypeId(property) != 0); } else { return (GetPropertyList(xmlName).Length() > 0); } }