WebAPI/WidgetAPI: Difference between revisions

Line 7: Line 7:
An application exposes its widget view via declaring details of widget in mainfest.
An application exposes its widget view via declaring details of widget in mainfest.


  {
{
     name: "MyApp2000",
     name: "MyApp2000",
     ...
     ...
Line 15: Line 15:
         "href": "/widget.html",
         "href": "/widget.html",
         "description": "This is my cool widget",
         "description": "This is my cool widget",
         "screenshot": "foo.jpg"
         "screenshot": "foo.jpg",
        "locales": {
          "en-US": {
            "name":"MyApp2000 Widget",
            "description":"This is my cool widget",
            "screenshot": "foo_en-US.jpg"
          }
        }
       },
       },
       "myotherwidget": { ... }
       "myotherwidget": { ... }
     }
     },
     widgetPages: [
     widgetPages: [
       "/widget.html",
       "/widget.html",
Line 24: Line 31:
       "/some_other_page.html"
       "/some_other_page.html"
     ]
     ]
    "locales": {
      "en-US": {
        "name" : "MyApp2000",
        "discription":"Cool App",
        "widgets": {
          "mywidget1": {
            "name":"MyApp2000 Widget",
            "description":"This is my cool widget",
            "screenshot": "foo_en-US.jpg"
          },
          "myotherwidget": { ... }
        }
      }
    }
   }
   }


Line 77: Line 70:


=== Localization of Widget Info ===
=== Localization of Widget Info ===
Similar to app's localization, the localization of widget info MUST be embedded in "widgets" of "locales" properties. And they are referenced to each other with widget id, like mywidget1 or myotherwidget.
Similar to app's localization, the localization of widget MUST be embedded in its declaration.


==Limited Browser API==
==Limited Browser API==
Confirmed users
209

edits