Difference between revisions of "Linden Lab Official:Viewer Web Widgets"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with "{{KBcaution|Work-in-progress! Expect these widgets to change over time. Watch this page for updates.}} {{Supported API}} These viewer web widgets are a first attempt at making t…")
 
Line 4: Line 4:
These viewer web widgets are a first attempt at making the current Second Life Viewer [http://viewer-login.agni.lindenlab.com/ login screen] features available for easy use in third-party viewers. Linden Lab provides a base javascript library which will search the DOM of a given page, populating specifically-named divs with widget content.  
These viewer web widgets are a first attempt at making the current Second Life Viewer [http://viewer-login.agni.lindenlab.com/ login screen] features available for easy use in third-party viewers. Linden Lab provides a base javascript library which will search the DOM of a given page, populating specifically-named divs with widget content.  


==Basic implementation==
=Basic implementation details=


The example below shows the simplest way to implement these widgets. Simply include the sl.widgets.js library, then include a div with both id="[the widget you want]" and class="second-life-widget".
The example below shows the simplest way to implement these widgets. Simply include the sl.widgets.js library, then include a div with both id="[the widget you want]" and class="second-life-widget".
Line 20: Line 20:
</html>
</html>
</pre>
</pre>
=Widget details=
==What's Hot==

Revision as of 17:17, 29 September 2011

KBcaution.png Important: Work-in-progress! Expect these widgets to change over time. Watch this page for updates.
NOTE: This is an official Second Life API provided and documented by Linden Lab. Its use is subject to the API Terms of Use.

These viewer web widgets are a first attempt at making the current Second Life Viewer login screen features available for easy use in third-party viewers. Linden Lab provides a base javascript library which will search the DOM of a given page, populating specifically-named divs with widget content.

Basic implementation details

The example below shows the simplest way to implement these widgets. Simply include the sl.widgets.js library, then include a div with both id="[the widget you want]" and class="second-life-widget".

<!DOCTYPE html>
<html>
    <head>
        <script type="text/javascript" src="http://lecs-viewer-login-agni.s3.amazonaws.com/pubwidgets/v1/modules/sl.widgets.js">
        </script>
    </head>
    <body>
        <div id="whats-hot-now-widget" class="second-life-widget"></div>
    </body>
</html>


Widget details

What's Hot