×
Namespaces

Variants
Actions
(Difference between revisions)

Developer guidelines for new Nokia Asha Web Apps runtime proxy server release

From Nokia Developer Wiki
Jump to: navigation, search
isalento (Talk | contribs)
(Isalento -)
rebloor (Talk | contribs)
m (Protected "Developer guidelines for new Series 40 web apps runtime proxy server release" ([edit=sysop] (indefinite) [move=sysop] (indefinite)))

Revision as of 06:09, 18 April 2013

This article provides information about the new Series 40 Web Apps Runtime Proxy server release.

Article Metadata
Article
Created: isalento (16 Apr 2013)
Last edited: rebloor (18 Apr 2013)

Attention, Series 40 web app developers: An updated runtime proxy rendering engine on our servers rolled out last week. The new server release has some implications for your future development efforts. This update features Mozilla's 'Gecko' browser engine and will improve the layout and JavaScript processing of the web app content. The updated engine has significant improvements in terms of performance and capabilities compared to the 'Rhino' engine it replaces. The new engine also complies strictly with the W3C standard, and offers more stability and compliance with other standards, including HTML5 and CSS3.

Here are five new developer guidelines for your web apps:

  • Series 40 web apps supports a single html document only even in the previous release. However some developers used some workarounds and made multiple html documents in a web app. These workarounds will not work with the updated engine.
  • element.innerText is no longer supported. Instead, you should use element.innerHTML
document.getElementById('el').innerText="Hello World";  // not supported
document.getElementById('el').innerHTML="Hello World"; // correct way
  • mwl.timer is always preferred over native JavaScript timer. The latter expires at the server, and so may not be useful to you.

Examples:

//Do Not use. This timer will expire at server only.
setTimeout("functionName()", 3500);
 
//Use Instead. This timer will expire at client side
mwl.timer('timerName',3500,1,'functionName();');
  • Use either <body onload="init()"> or JavaScript window.onload=function(){...};, but not both. If mwl API needs to be called in an onload event, then 'body onload' is preferred.
  • When using the <form> tag without action attribute, <input type="button"> should be used. Use of <input type='submit'> is only allowed when form has an action attribute with an absolute URL.

Examples:

<!-- Do Not Use -->
<form id="fid" name="fbform"> feedback<br/>
<input type="text" name="tb" id="tb"/><br/>
<input type="submit" value="Send" name="pb" id="pb" onclick="validate();"/>
</form>
 
<!-- Use Instead -->
<form id="fid" name="fbform"> feedback<br/>
<input type="text" name="tb" id="tb"/><br/>
<input type="button" value="Send" name="pb" id="pb" onclick="validate();"/>
</form>
189 page views in the last 30 days.
×