FileDocCategorySizeDatePackage
HTMLScriptElementImpl.javaAPI DocJava SE 5 API5632Fri Aug 26 14:55:28 BST 2005com.sun.org.apache.html.internal.dom

HTMLScriptElementImpl

public class HTMLScriptElementImpl extends HTMLElementImpl implements HTMLScriptElement
version
$Revision: 1.6 $ $Date: 2003/05/08 20:13:09 $
author
Assaf Arkin
see
org.w3c.dom.html.HTMLScriptElement
see
com.sun.org.apache.xerces.internal.dom.ElementImpl

Fields Summary
Constructors Summary
public HTMLScriptElementImpl(HTMLDocumentImpl owner, String name)
Constructor requires owner document.

param
owner The owner HTML document

        super( owner, name );
    
Methods Summary
public java.lang.StringgetCharset()

        return getAttribute( "charset" );
    
public booleangetDefer()

        return getBinary( "defer" );
    
public java.lang.StringgetEvent()

        return getAttribute( "event" );
    
public java.lang.StringgetHtmlFor()

        return getAttribute( "for" );
    
public java.lang.StringgetSrc()

        return getAttribute( "src" );
    
public java.lang.StringgetText()

        Node    child;
        String    text;
        
        // Find the Text nodes contained within this element and return their
        // concatenated value. Required to go around comments, entities, etc.
        child = getFirstChild();
        text = "";
        while ( child != null )
        {
            if ( child instanceof Text )
                text = text + ( (Text) child ).getData();
            child = child.getNextSibling();
        }
        return text;
    
public java.lang.StringgetType()

        return getAttribute( "type" );
    
public voidsetCharset(java.lang.String charset)

        setAttribute( "charset", charset );
    
public voidsetDefer(boolean defer)

        setAttribute( "defer", defer );
    
public voidsetEvent(java.lang.String event)

        setAttribute( "event", event );
    
public voidsetHtmlFor(java.lang.String htmlFor)

        setAttribute( "for", htmlFor );
    
public voidsetSrc(java.lang.String src)

        setAttribute( "src", src );
    
public voidsetText(java.lang.String text)

        Node    child;
        Node    next;
        
        // Delete all the nodes and replace them with a single Text node.
        // This is the only approach that can handle comments and other nodes.
        child = getFirstChild();
        while ( child != null )
        {
            next = child.getNextSibling();
            removeChild( child );
            child = next;
        }
        insertBefore( getOwnerDocument().createTextNode( text ), getFirstChild() );
    
public voidsetType(java.lang.String type)

        setAttribute( "type", type );