×
Namespaces

Variants
Actions
(Difference between revisions)

How-to use systeminfo API in WRT widgets

From Nokia Developer Wiki
Jump to: navigation, search
fdavis (Talk | contribs)
jario (Talk | contribs)
Line 4: Line 4:
  
  
== '''Under construction''' ==
+
== HTML ==
 +
To enable system info API in widgets it needs to be embedded in the document since it is implemented as a netscape scriptable plug-in.
 +
 
 +
<code>
 +
  <embed type="application/x-systeminfo-widget" hidden="yes"></embed>
 +
</code>
 +
 
 +
HTML example
 +
 
 +
<code>
 +
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
 +
"http://www.w3.org/TR/html4/strict.dtd">
 +
<html>
 +
<head>
 +
  <script type="text/javascript" src="api.js" />
 +
<body onload="testapi()">
 +
  <embed type="application/x-systeminfo-widget" hidden="yes"></embed>
 +
</body>
 +
</html>
 +
 
 +
</code>
 +
 
 +
== JavaScript ==
 +
<code>
 +
function testapi()
 +
  var sysinfo = document.embeds[0];
 +
  sysinfo.beep(5000, 900);
 +
}
 +
 
 +
</code>

Revision as of 20:09, 22 October 2007


Compatibility: Web Run-Time in S60 3rd Edition, Feature Pack 2


HTML

To enable system info API in widgets it needs to be embedded in the document since it is implemented as a netscape scriptable plug-in.

  <embed type="application/x-systeminfo-widget" hidden="yes"></embed>

HTML example

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" 
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script type="text/javascript" src="api.js" />
<body onload="testapi()">
<embed type="application/x-systeminfo-widget" hidden="yes"></embed>
</body>
</html>

JavaScript

function testapi() 
var sysinfo = document.embeds[0];
sysinfo.beep(5000, 900);
}
 

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×