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 Mobile" أيضا إصدار "WebKit / Firefox / Opera"؟

إذا لم يكن الأمر كذلك، فما هي الطريقة الموصى بها لتسليم المكتبة؟كنت أفكر في استخدام التعليقات الشرطية لتضمين الإصدارات المختلفة إذا كان ذلك ضروريا.على سبيل المثال giveacodicetagpre.

هل كانت مفيدة؟

المحلول

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