Ejemplo n.º 1
0
DOMHTMLCollection* DOMHTMLDocument::forms()
{
    if (!m_document || !m_document->isHTMLDocument())
        return 0;

    HTMLDocument* htmlDoc = static_cast<HTMLDocument*>(m_document);
    return DOMHTMLCollection::createInstance(htmlDoc->forms().get());
}
HRESULT STDMETHODCALLTYPE DOMHTMLDocument::forms( 
        /* [retval][out] */ IDOMHTMLCollection** collection)
{
    *collection = 0;
    if (!m_document || !m_document->isHTMLDocument())
        return E_FAIL;

    HTMLDocument* htmlDoc = static_cast<HTMLDocument*>(m_document);
    *collection = DOMHTMLCollection::createInstance(htmlDoc->forms().get());
    return S_OK;
}