Silverlight - Browser Quirks/Errors

Date: 2011-03-22

Browser quirks

Parameters and case-sensitivity

http://www.codingforums.com/showthread.php?t=44364
HTML is case insensitive. The most common form, almost an informal standard really, uses all upper case for element and attribute names. This is also the form it is normalised to in the DOM.

XML and XHTML are case sensitive. What case you use for your XML based language varies but in the case of XHTML all elements are lower case. Because of this future HTML version being all lower case and HTML being case insensitive, most web developers began using lower case only years ago. Web developers using XHTML are of course REQUIRED to use lower case.

Do not confuse Javascript which is and always has been case sensitive with the HTML code it's often embedded within which hasn't been case sensitive in the past but now (with xHTML) is.

Example:
onmousemove is an HTML attribute which happens to be an event handler. It is not Javascript, the value of that attribute is.
The only Javascript in the sample below is the bold part.
So:

  <img name="myImage" src="myimage.gif" onmousemove="myJavascriptFunction()" />
  

is different from:

  <img name="myImage" src="myimage.gif" onmousemove="myjavascriptfunction()" />
  

The onmousemove attribute (or all attributes for that matter) is case-insensitive in HTML.
On the other hand event handlers are scriptable in Javascript.

  document.images['myImage'].onmousemove = myJavascriptFunction;
  

in that case, onmousemove is case-sensitive.

  They do. Try entering the following in the location bar 
  javascript:AlErT('If JavaScript were case insensitive, this would work') and 
  compare to what happens when you enter 
  javascript:alert('...but JavaScript is case sensitive, thus this works but not the other one.')
  

Firefox 4.0.1
Chrome 12.0.733.0.dev

Causes error - Sl not installed - click downloads SL - allready installed

Get Microsoft Silverlight

Empty paramteres cause this error: TODO check which!!

    <param name="background" value="" />

    <-- 
      empty initparams cause error!!! 
      <param name="initparams" value="" />
      use dummy!
    ->
     <param name="initparams" value="dummSon" />

  
  <div id="Div1">
  <object id="object1" data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="400" height="100">
    <param name="source" value="/ClientBin/HolisticWare.WWWLogo.EXE_SL3.xap" />
    <param name="onError" value="onSilverlightError" />
    <!-- empty value for initparams not OK use transparent -->
    <param name="background" value="transparent" />
    <param name="minRuntimeVersion" value="4.0.50826.0" />
    <param name="autoUpgrade" value="true" />
    <param name="allowHtmlPopupWindow" value="true" />
    <param name="enablehtmlaccess" value="true" />
    <!-- empty value for initparams not OK use dummy -->
    <param name="initparams" value="dumee" />
    <param name="MaxFrameRate" value="60" />
    <!-- wrong param names are tolerated -->
    <param name="OnFullScreenChanged" value="" />
    <param name="OnLoad" value="" />
    <param name="OnResize" value="" />
    <param name="OnSourceDownloadComplete" value="" />
    <param name="OnSourceDownloadProgressChanged" value="" />
    <!-- empty value for SplashScreenSource not OK use dummy -->
    <param name="SplashScreenSource" value="dumee" />
    <!-- empty value for windowless is tolerated! -->
    <param name="Windowless" value="" />

    <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
    <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none" />
    </a>
  </object>
  <iframe id="Iframe1" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe>
  </div>
  
Get Microsoft Silverlight

References