Bug 1428745 - Remove support for version parameter from script loader - trimming script type, r=jonco
This commit is contained in:
@@ -171,9 +171,20 @@ HTMLScriptElement::SetText(const nsAString& aValue, ErrorResult& aRv)
|
||||
// need to be transfered when modifying
|
||||
|
||||
bool
|
||||
HTMLScriptElement::GetScriptType(nsAString& type)
|
||||
HTMLScriptElement::GetScriptType(nsAString& aType)
|
||||
{
|
||||
return GetAttr(kNameSpaceID_None, nsGkAtoms::type, type);
|
||||
nsAutoString type;
|
||||
if (!GetAttr(kNameSpaceID_None, nsGkAtoms::type, type)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// ASCII whitespace https://infra.spec.whatwg.org/#ascii-whitespace:
|
||||
// U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE.
|
||||
static const char kASCIIWhitespace[] = "\t\n\f\r ";
|
||||
type.Trim(kASCIIWhitespace);
|
||||
|
||||
aType.Assign(type);
|
||||
return true;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user