Frage

Ich möchte xui.js in einem mobilen Webprojekt verwenden, das auf iOS, Android und Windows Phone 7 arbeiten muss. Die Dokumentation (http://xuijs.com/) ist ein wenig unklar, da die verschiedenen Versionen enthalten sind.Enthält die Version "IE & IE Mobile" auch die Version "Webkit / Firefox / Opera"?

Wenn nicht, was ist die empfohlene Art, die Bibliothek zu liefern?Ich erwägte, bedingte Kommentare, um die verschiedenen Versionen aufzunehmen, falls dies erforderlich ist.z.B. generasacodicetagpre.

War es hilfreich?

Lösung

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.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top