Просмотр исходного кода

Merge pull request #13 from mooflu/special_parent_token

Add special #parent token (similar to #document and #self)
Lloyd Weehuizen 14 лет назад
Родитель
Сommit
0c94556f11
1 измененных файлов с 2 добавлено и 0 удалено
  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();