public function find($selector)
    {
        if (\is_string($selector)) {
            $css_expression = $selector;
        } else {
            $selector_tag_names = array();
            $selector_result = self::create($selector);
            foreach ($selector_result as $node) {
                $selector_tag_names[] = $node->tagName;
            }
            $css_expression = implode(',', $selector_tag_names);
        }

        $xpath_expression = CssToXpath::transform($css_expression);
        $result = $this->xpath($xpath_expression);

        if (\is_string($selector)) {
            $result->css_query = $css_expression;
            $result->selector = $css_expression; // jquery style
        }

        if (isset($selector_result)) {
            $new_result_nodes = array();
            foreach ($result->nodes as $result_node) {
                foreach ($selector_result->nodes as $selector_result_node) {
                    if ($result_node->isSameNode($selector_result_node)) {
                        $new_result_nodes[] = $result_node;
                    }
                }
            }
            $result->nodes = $new_result_nodes;
        }

        return $result;
    }