Explorar o código

Add special #parent token (similar to #document and #self) handling in GetElementById.

Frank Becker %!s(int64=14) %!d(string=hai) anos
pai
achega
59f7d9350a
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      Source/Core/Element.cpp

+ 2 - 0
Source/Core/Element.cpp

@@ -1179,6 +1179,8 @@ Element* Element::GetElementById(const String& id)
 		return this;
 	else if (id == "#document")
 		return GetOwnerDocument();
+	else if (id == "#parent")
+		return this->parent;
 	else
 	{
 		Element* search_root = GetOwnerDocument();