HTMLScriptElement
Represents an HTML script element.
namespace AngleSharp.DOM.Html
{
[DOM("HTMLScriptElement")]
public sealed class HTMLScriptElement : HTMLElement
{
internal const string Tag = "script";
[DOM("src")]
public string Src { get; set; }
[DOM("type")]
public string Type { get; set; }
[DOM("charset")]
public string Charset { get; set; }
[DOM("async")]
public bool Async { get; set; }
[DOM("defer")]
public bool Defer { get; set; }
[DOM("crossOrigin")]
public CORSSettings CrossOrigin { get; set; }
[DOM("text")]
public string Text {
get {
return TextContent;
}
set {
TextContent = value;
}
}
protected internal override bool IsSpecial => true;
internal HTMLScriptElement()
{
_name = "script";
Async = true;
}
protected override void Register(Document document)
{
if (document is HTMLDocument)
((HTMLDocument)document).Scripts.Add(this);
}
protected override void Unregister(Document document)
{
if (document is HTMLDocument)
((HTMLDocument)document).Scripts.Remove(this);
}
}
}