如何在 GWT 中设置文档类型
How to set doctype in GWT
我找不到如何强制 GWT 在已编译的 HTML 页面的 header 中使用特定文档类型的方法。
我没有使用 UI 活页夹,我的应用程序中的 UI 元素是使用入口点 onModuleLoad()
方法中的 RootPanel.get.add()
添加的 class.
您的 GWT 应用程序的 DOCTYPE 在主机页面内设置。
在 GWT 文档中,您会发现:
The GWT 2.0 layout system is intended to work only in “standards
mode”. This means that you should always place the following
declaration at the top of your HTML pages: <!DOCTYPE html>
link: GWT documentation
因此,您应该在应用程序中使用 "standards mode"。
我找不到如何强制 GWT 在已编译的 HTML 页面的 header 中使用特定文档类型的方法。
我没有使用 UI 活页夹,我的应用程序中的 UI 元素是使用入口点 onModuleLoad()
方法中的 RootPanel.get.add()
添加的 class.
您的 GWT 应用程序的 DOCTYPE 在主机页面内设置。
在 GWT 文档中,您会发现:
The GWT 2.0 layout system is intended to work only in “standards mode”. This means that you should always place the following declaration at the top of your HTML pages: <!DOCTYPE html>
link: GWT documentation
因此,您应该在应用程序中使用 "standards mode"。