RawTextNode class final
The content of a <script> or <style> element. HTML entities mean
nothing there, so it is not escaped; instead every </script is
written <\/script (</style as <\/style), and in a script every <!-- is
written <\!--, so the content cannot end the element early or switch
the parser into a state where it misses the end tag. Inside a JavaScript
string or a CSS string both spellings mean the same characters.
Constructors
- RawTextNode(String text, {required String tag})
-
textas the content of atag(scriptorstyle) element.const
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
) → String -
The node's HTML.
inherited
-
toResponse(
Request request) → Response -
The response for
request.inherited -
toString(
) → String -
A string representation of this object.
inherited
-
writeTo(
StringSink out) → void -
Writes the node's HTML to
out.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
guardRawText(
String text, {required String tag}) → String -
textmade safe to write inside atagelement (see RawTextNode).