#ifndef HTMLScriptElement_h
#define HTMLScriptElement_h
#include "core/dom/ScriptLoaderClient.h"
#include "core/html/HTMLElement.h"
namespace WebCore {
class ScriptLoader;
class HTMLScriptElement FINAL : public HTMLElement, public ScriptLoaderClient {
public:
static PassRefPtr<HTMLScriptElement> create(Document&, bool wasInsertedByParser, bool alreadyStarted = false);
String text() { return textFromChildren(); }
void setText(const String&);
KURL src() const;
void setAsync(bool);
bool async() const;
ScriptLoader* loader() const { return m_loader.get(); }
private:
HTMLScriptElement(Document&, bool wasInsertedByParser, bool alreadyStarted);
virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERRIDE;
virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
virtual void didNotifySubtreeInsertionsToDocument() OVERRIDE;
virtual void childrenChanged(bool changedByParser = false, Node* beforeChange = 0, Node* afterChange = 0, int childCountDelta = 0) OVERRIDE;
virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE;
virtual const QualifiedName& subResourceAttributeName() const OVERRIDE;
virtual String sourceAttributeValue() const OVERRIDE;
virtual String charsetAttributeValue() const OVERRIDE;
virtual String typeAttributeValue() const OVERRIDE;
virtual String languageAttributeValue() const OVERRIDE;
virtual String forAttributeValue() const OVERRIDE;
virtual String eventAttributeValue() const OVERRIDE;
virtual bool asyncAttributeValue() const OVERRIDE;
virtual bool deferAttributeValue() const OVERRIDE;
virtual bool hasSourceAttribute() const OVERRIDE;
virtual void dispatchLoadEvent() OVERRIDE;
virtual PassRefPtr<Element> cloneElementWithoutAttributesAndChildren() OVERRIDE;
OwnPtr<ScriptLoader> m_loader;
};
}
#endif