Xui.js для мобильных устройств, включая Windows Phone 7

StackOverflow https://stackoverflow.com/questions/9020761

  •  14-11-2019
  •  | 
  •  

Вопрос

Я хочу использовать Xui.js в мобильном веб-проекте, который должен работать на iOS, Android и Windows Phone 7. Документация (http://xuijs.com/) немного неясна, так как разные версии включаютОтказВ версии «IE & IE IE Mobile» также включает в себя версию «Webkit / Firefox / Opera»?

Если нет, какой рекомендуемый способ доставки библиотеки?Я рассматривал возможность использования условных комментариев для включения различных версий, если это необходимо.например

<!--[if IE]>
<script src="xui-ie.js"></script>
<!-- <![endif]-->

<!--[if !IE]>
<script src="xui.js"></script>
<!-- <![endif]-->    
.

Это было полезно?

Решение

I haven't investigated this much myself yet, but I've found others approaching it conditionally, like you: http://danny-t.co.uk/index.php/2012/03/10/conditionally-loading-xui-js-for-webkit-blackberry-or-ie/

Having quickly looked at the source of the ie- and the webkit/ff/opera-version it appears that the IE-version is somewhat tailored for IE, and will have issues if used on the other engines.

An example is the implementation of on in the IE-version, that uses attachEvent which is IE-only (maybe also Opera), and so wouldn't work on FF, Safari etc.

So in my opinion, it does look like you're on the right path.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top