Which doctype should I use for GWT 2.0?

∥☆過路亽.° 提交于 2020-01-02 03:37:11

问题


I think I should use <!DOCTYPE html> for my new GWT application; I understand that doing so will put my application into standards-compliant mode. Am I correct? Are there any disadvantages to using this doctype? Does GWT work properly in standards-compliant mode? I'm wary because the GWT tutorial still uses the HTML 4.01 transitional doctype.


回答1:


The new layout panel functionality in GWT 2.0 requires standards mode and does not work in quirks mode.




回答2:


Using <!DOCTYPE html> will put the web browser into standards mode (as opposed to quirksmode) which is almost certainly what you want. But the HTML 4.01 Transitional doctype will also trigger standards mode, so there's no difference there.

I've no idea of the implications of using one or the other with GWT - but I doubt there are any advantages to using the HTML5 doctype to be honest, unless GWT is doing special things to support HTML5.



来源:https://stackoverflow.com/questions/2641866/which-doctype-should-i-use-for-gwt-2-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!