<div dir="ltr">The beautiful world of multiple almost compatible implementations :)<div>Thanks for looking at this issues, document and share.</div><div><br></div><div>Gonzalo</div><div><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Jun 9, 2014 at 5:11 PM, Lionel Laské <span dir="ltr"><<a href="mailto:lionel@olpc-france.org" target="_blank">lionel@olpc-france.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><br><div><p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">Hi all,</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">Working
on the last version of Sugarizer, I've spent lot of time to better handle
compatibility issues on different browsers.</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">Here two
issues that I've detected in sugar-web. I would like to share it with you:</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">1)
CustomEvent: Like lot of HTML5 features, CustomEvent is only a draft. BTW the
version without constructor [1] is currently more deployed in browsers than the
one with a constructor [2]. The sugar-web template use the later in two files
activity.js [3] and menupalette.js [4]. It's possible to convert the call to
the version with constructor to the version without constructor without
changing the way of working of the code. Here how I've fixed it in activity.js
[5] and here how I've fixed it in menupalette.js [6].</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">No other
line had to be changed and with these few changes, more browsers (IE, old
Android browsers, …) are compliant with sugar-web. I suggest that we should
make these changes. I could do a pull request if you want.</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">Note that
the same issue is also in the Paint Web Activity for the color palette. Here is
my fix [7].</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">2) Quote
around CSS URL background image: It seems that the url value for the image used
as background in the CSS is different between Webkit and other browser
(specifically Firefox). So the line [8] return a quoted string on Firefox which
is incorrect (and it broke the icon drawing). I've done an ugly work-around [9]
to avoid that but maybe there is a better way to do that.</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">Hope it
will inspire you.</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US">Best
regards from France.</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in 0in 0in 0.375in;font-family:Calibri;font-size:11pt" lang="en-US">Lionel.</p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in;font-family:Calibri;font-size:11pt" lang="en-US"> </p>

<p style="margin:0in;font-family:Calibri;font-size:11pt"><span lang="en-US">[1]
</span><a href="https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#interface-CustomEvent" target="_blank"><span lang="fr">https://dvcs.w3.org/hg/dom3events/raw-file/tip/html/DOM3-Events.html#interface-CustomEvent</span></a></p>



<p style="margin:0in;font-family:Calibri;font-size:11pt">[2] <a href="https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-customevent" target="_blank">https://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#interface-customevent</a></p>



<p style="margin:0in;font-family:Calibri;font-size:11pt"><span lang="en-US">[3]
</span><a href="https://github.com/sugarlabs/sugar-web/blob/master/activity/activity.js#L22" target="_blank"><span lang="fr">https://github.com/sugarlabs/sugar-web/blob/master/activity/activity.js#L22</span></a></p>

<p style="margin:0in;font-family:Calibri;font-size:11pt">[4] <a href="https://github.com/sugarlabs/sugar-web/blob/master/graphics/menupalette.js#L11" target="_blank">https://github.com/sugarlabs/sugar-web/blob/master/graphics/menupalette.js#L11</a></p>



<p style="margin:0in;font-family:Calibri;font-size:11pt">[5] <a href="https://github.com/llaske/sugarizer/blob/master/activities/ActivityTemplate/lib/sugar-web/activity/activity.js#L22" target="_blank">https://github.com/llaske/sugarizer/blob/master/activities/ActivityTemplate/lib/sugar-web/activity/activity.js#L22</a></p>



<p style="margin:0in;font-family:Calibri;font-size:11pt">[6] <a href="https://github.com/llaske/sugarizer/blob/master/activities/ActivityTemplate/lib/sugar-web/graphics/menupalette.js#L11" target="_blank">https://github.com/llaske/sugarizer/blob/master/activities/ActivityTemplate/lib/sugar-web/graphics/menupalette.js#L11</a></p>



<p style="margin:0in;font-family:Calibri;font-size:11pt">[7] <a href="https://github.com/llaske/sugarizer/blob/master/activities/Paint.activity/js/colorpalette.js#L9" target="_blank">https://github.com/llaske/sugarizer/blob/master/activities/Paint.activity/js/colorpalette.js#L9</a></p>



<p style="margin:0in;font-family:Calibri;font-size:11pt">[8] <a href="https://github.com/sugarlabs/sugar-web/blob/master/graphics/icon.js#L60" target="_blank">https://github.com/sugarlabs/sugar-web/blob/master/graphics/icon.js#L60</a></p>



<p style="margin:0in;font-family:Calibri;font-size:11pt">[9] <a href="https://github.com/llaske/sugarizer/blob/master/activities/ActivityTemplate/lib/sugar-web/graphics/icon.js#L61" target="_blank">https://github.com/llaske/sugarizer/blob/master/activities/ActivityTemplate/lib/sugar-web/graphics/icon.js#L61</a></p>

</div></div>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr">Gonzalo Odiard<br><br><div>SugarLabs - Software for children learning <br></div></div>
</div>