I can't speak officially for any of the early decisions made in the project, but the guiding principles seem to be:
1. If possible, adhere to an existing W3C standard (File, Storage) 2. If there is a de facto standard implemented on desktop browsers,use that (Accelerometer, Geolocation) 3. If there is a natural mapping to a closely related desktop API, then mimic that. (e.g, window.open -> InAppBrowser) 4. Other plugins were generally attached to navigator (navigator.compass, navigator.globalization, navigator.splashscreen), except for 5. A couple of APIs (e.g., Device, Media) which were assigned to window. Custom namespaces are really just objects attached to the global window object; that's how Media and File are defined. (In the browser, all lookups eventually go back to window; that's just where globals live.) Ian On Sat, Oct 12, 2013 at 4:55 AM, Qi LUO <[email protected]> wrote: > Hi all, > > Everyone can access plugins at window or navigator object, but I’m quite > curious that how you guys make the decision when you define a plugin? Why > someone is on the window object but another is on the navigator object or > any custom namespace else? > Thanks. > > Best Regards, > > Qi LUO > Sent with Sparrow (http://www.sparrowmailapp.com/?sig) > >
