Browse Source

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

Frank Becker 14 years ago
parent
commit
59f7d9350a
1 changed files with 2 additions and 0 deletions
  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;
 		return this;
 	else if (id == "#document")
 	else if (id == "#document")
 		return GetOwnerDocument();
 		return GetOwnerDocument();
+	else if (id == "#parent")
+		return this->parent;
 	else
 	else
 	{
 	{
 		Element* search_root = GetOwnerDocument();
 		Element* search_root = GetOwnerDocument();