[ES6] Add ScriptElement::determineScriptType
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Aug 2016 06:28:24 +0000 (06:28 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Aug 2016 06:28:24 +0000 (06:28 +0000)
commit3e756d34f5301db45a4a749de22af0f346960ffe
treeffc8e84267ab1987331cb9af0110f63b76cb45e0
parentab55e8d75858bcf71e7507b5c0a471761be17448
[ES6] Add ScriptElement::determineScriptType
https://bugs.webkit.org/show_bug.cgi?id=149576

Reviewed by Ryosuke Niwa.

Change ScriptElement::isScriptTypeSupported to ScriptElement::determineScriptType.
And introduce ScriptType, which is either "classic" or "module".
And support "module" type in ScriptElement[1, 2].
But this patch does not contain any module tag support code.
This will be implemented in the subsequent patch.

[1]: https://html.spec.whatwg.org/multipage/webappapis.html#integration-with-the-javascript-module-system
[2]: https://html.spec.whatwg.org/multipage/scripting.html#attr-script-type

* dom/ScriptElement.cpp:
(WebCore::ScriptElement::determineScriptType):
(WebCore::ScriptElement::prepareScript):
(WebCore::ScriptElement::isScriptTypeSupported): Deleted.
* dom/ScriptElement.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@204221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/dom/ScriptElement.cpp
Source/WebCore/dom/ScriptElement.h