Workaround for xml data islands

前端 未结 2 475
孤独总比滥情好
孤独总比滥情好 2021-01-02 22:31

I recently inherited a huge webapp which is a combination of JSP,Javascript and Java. It works only on IE due to the way it has been coded using xml data islands and other t

2条回答
  •  自闭症患者
    2021-01-02 22:42

    From IE10 onwards, XML data islands are no longer supported - the browser parses them as HTML. The Mozilla Developer Network have produced an article which gives a cross-browser alternative to XML data islands, namely an HTML5 "data block". The article demonstrates that a tag.

    Source: https://developer.mozilla.org/en/docs/Using_XML_Data_Islands_in_Mozilla

    Here's the HTML example they give...

    
    
    
    XML Data Block Demo
    
    
    
    
    
    Demo did not run
    
    
    

    You will need to write your own method to load data into that block (perhaps using jQuery.get or .load methods).

    Hope that helps!

提交回复
热议问题