@@ -79,6 +79,8 @@ ccui.WebView = ccui.Widget.extend({
7979 * go back
8080 */
8181 goBack : function ( ) {
82+ if ( ccui . WebView . polyfill . closeHistory )
83+ return cc . log ( "The current browser does not support the GoBack" ) ;
8284 var iframe = this . _renderCmd . _iframe ;
8385 if ( iframe ) {
8486 var win = iframe . contentWindow ;
@@ -91,6 +93,8 @@ ccui.WebView = ccui.Widget.extend({
9193 * go forward
9294 */
9395 goForward : function ( ) {
96+ if ( ccui . WebView . polyfill . closeHistory )
97+ return cc . log ( "The current browser does not support the GoForward" ) ;
9498 var iframe = this . _renderCmd . _iframe ;
9599 if ( iframe ) {
96100 var win = iframe . contentWindow ;
@@ -195,14 +199,25 @@ ccui.WebView.EventType = {
195199
196200( function ( ) {
197201
198- ccui . WebView . polyfill = {
202+ var polyfill = ccui . WebView . polyfill = {
199203 devicePixelRatio : false ,
200204 enableDiv : false
201205 } ;
202206
203207 if ( cc . sys . os === cc . sys . OS_IOS )
204208 ccui . WebView . polyfill . enableDiv = true ;
205209
210+ if ( cc . sys . isMobile ) {
211+ if ( cc . sys . browserType === cc . sys . BROWSER_TYPE_FIREFOX ) {
212+ polyfill . enableBG = true ;
213+ }
214+ } else {
215+ if ( cc . sys . browserType === cc . sys . BROWSER_TYPE_IE ) {
216+ polyfill . closeHistory = true ;
217+ }
218+ }
219+
220+
206221} ) ( ) ;
207222
208223( function ( polyfill ) {
@@ -222,6 +237,10 @@ ccui.WebView.EventType = {
222237 } else {
223238 this . _div = this . _iframe = document . createElement ( "iframe" ) ;
224239 }
240+
241+ if ( polyfill . enableBG )
242+ this . _div . style [ "background" ] = "#FFF" ;
243+
225244 this . _iframe . addEventListener ( "load" , function ( ) {
226245 cc . eventManager . dispatchCustomEvent ( ccui . WebView . EventType . LOADED ) ;
227246 } ) ;
0 commit comments