HTMLScriptElement.h [plain text]
#pragma once
#include "HTMLElement.h"
#include "ScriptElement.h"
namespace WebCore {
class HTMLScriptElement final : public HTMLElement, public ScriptElement {
WTF_MAKE_ISO_ALLOCATED(HTMLScriptElement);
public:
static Ref<HTMLScriptElement> create(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted = false);
String text() const { return scriptContent(); }
WEBCORE_EXPORT void setText(const String&);
URL src() const;
WEBCORE_EXPORT void setAsync(bool);
WEBCORE_EXPORT bool async() const;
WEBCORE_EXPORT void setCrossOrigin(const AtomString&);
WEBCORE_EXPORT String crossOrigin() const;
void setReferrerPolicyForBindings(const AtomString&);
String referrerPolicyForBindings() const;
ReferrerPolicy referrerPolicy() const final;
using HTMLElement::ref;
using HTMLElement::deref;
private:
HTMLScriptElement(const QualifiedName&, Document&, bool wasInsertedByParser, bool alreadyStarted);
void parseAttribute(const QualifiedName&, const AtomString&) final;
InsertedIntoAncestorResult insertedIntoAncestor(InsertionType, ContainerNode&) final;
void didFinishInsertingNode() final;
void childrenChanged(const ChildChange&) final;
bool isURLAttribute(const Attribute&) const final;
void addSubresourceAttributeURLs(ListHashSet<URL>&) const final;
String sourceAttributeValue() const final;
String charsetAttributeValue() const final;
String typeAttributeValue() const final;
String languageAttributeValue() const final;
String forAttributeValue() const final;
String eventAttributeValue() const final;
bool hasAsyncAttribute() const final;
bool hasDeferAttribute() const final;
bool hasNoModuleAttribute() const final;
bool hasSourceAttribute() const final;
void dispatchLoadEvent() final;
Ref<Element> cloneElementWithoutAttributesAndChildren(Document&) final;
};
}