Difference between revisions of "Internet Browser"

From 3dbrew
Jump to navigation Jump to search
Line 17: Line 17:
 
New3DS has a separate browser title, the exheader name is "SKATER".
 
New3DS has a separate browser title, the exheader name is "SKATER".
  
Unlike the Old3DS browser, this New3DS browser has videos+HTML5 support. This browser also has a filter enabled by default(probably a proxy?). Disabling it requires paying money with a credit-card, for [[NIM_Services|purchasing]] web-browser [[Title_list/DLC|DLC]].
+
Unlike the Old3DS browser, this New3DS browser has videos+HTML5 support. This browser also has a filter enabled by default. Disabling it requires paying money with a credit-card, for [[NIM_Services|purchasing]] web-browser [[Title_list/DLC|DLC]].
  
 
The WebKit source was updated since the Old3DS browser, however it's still old.
 
The WebKit source was updated since the Old3DS browser, however it's still old.

Revision as of 17:44, 12 October 2014

The 3DS Internet Browser was added in the June 2011 Update for JPN/EUR/USA.

From the Internet Browser help section: In compliance with the LGPL, the source code of the OSS is available via the Nintendo website. This source code can be downloaded here: [1] [2]

The 3DS Internet Browser is Netfront Browser NX v1.0 based on WebKit engine.

The browser supports up to 64 bookmarks.

The exheader name of this title is "spider".

The only difference between the ExeFS .code for each region of the Old3DS/New3DS browser, is byte values for the title uniqueID/region, otherwise the binaries are identical.

New 3DS Internet Browser

New3DS has a separate browser title, the exheader name is "SKATER".

Unlike the Old3DS browser, this New3DS browser has videos+HTML5 support. This browser also has a filter enabled by default. Disabling it requires paying money with a credit-card, for purchasing web-browser DLC.

The WebKit source was updated since the Old3DS browser, however it's still old.

User-Agent and Browser Versions

User-agent format: "Mozilla/5.0 (New Nintendo 3DS like iPhone) AppleWebKit/<WebKit version> (KHTML, like Gecko) NX/<Netfront version> Mobile NintendoBrowser/<Mobile NintendoBrowser version>.<unknown0>:/<unknown1>.<region>"

<region> can be one of the following: "JP", "US", or "EU".

WebKit version Netfront version Mobile NintendoBrowser version CDN Title-version Network-only system-update version Notes
536.30 3.0.0.5.8 1.0 v10 8.1.0-0_New3DS Initial version.

Note that the latest Old3DS browser WebKit version at the time the initial New3DS browser was released, was the following: 532.8.


Old3DS browser


User-Agent and Browser Versions

User-agent format: "Mozilla/5.0 (Nintendo 3DS; U; ; <lang>) Version/<version>.<region>". <lang> is "en", "fr", etc. <region> is "US", "EU", etc. See below for <version>.

Browser version CDN Title-version Network-only system-update version Notes
1.7412 v6 2.0.0-2 This was the initial version.
1.7455 v1024 2.1.0-4 ExeFS .code was updated, both of the CROs(webkit/OSS) were updated too.
1.7498 v2050 4.0.0-7 ExeFS .code was updated, both of the CROs(webkit/OSS) were updated too. The manual CFA was updated as well.
1.7552 v3075 5.0.0-11 ExeFS .code and icon were updated, both of the CROs(webkit/OSS) were updated too. The manual CFA was updated as well.
1.7552 v3088 7.0.0-13 The main NCCH wasn't updated at all(same TMD contentID/content-hash as the previous version), only the manual CFA for this title was updated.
1.7567 v4096 7.1.0-16 The CXI .code was updated, some data in the RomFS was updated(none of the CROs such as webkit.cro were updated). The manual CFA was updated too.

Web Standards

  • HTML 4.01
  • HTML 5 (120/400 score on HTML5Test.com)
  • XHTML 1.1
  • CSS 1
  • CSS 2.1
  • CSS 3 (some functionality is unavailable)
  • DOM Levels 1-3
  • ECMAScript (partial support for ECMA-262 5th Edition)
  • XMLHttpRequest Level 2
  • Canvas Element (some functionality is unavailable)

Protocols

  • HTTP 1.0
  • HTTP 1.1
  • SSLv3
  • TLS 1.0

Image Formats

  • MPO
  • GIF
  • JPEG
  • PNG
  • BMP
  • ICO (some files cannot be displayed)

Plug-Ins

Plug-ins (such as Adobe Flash) are not supported.

Other details

  • It scored 90/100 on Acid3 test
  • Images from the Internet can be saved to the SD Card and viewed using the Nintendo 3DS Camera application.
  • Images saved to an SD Card or to the Nintendo 3DS system memory can be uploaded to blogs or other sites that allow the uploading of photos using :
<input type="file" />
  • HTML5Test.com say that Drag and drop is supported but it's not (code on WebKit is ready, but it's not implemented on interface of browser)

Tips

Detect User Agent

To detect if the user agent is Nintendo 3DS Browser :

<script type="text/javascript">
    if (navigator.userAgent.indexOf('Nintendo 3DS') == -1) { //If the UserAgent is not "Nintendo 3DS"
        location.replace('http://www.3dbrew.org'); //Redirect to an other page
    }
</script>
  • You can check navigator.platform=="Nintendo 3DS" as well.

Scrolling

Scrolling can be altered by modifying document.body.scrollTop and document.body.scrollLeft. However, there are drawbacks related to working with these properties:

  • Both properties return 0 when accessed
  • Setting one property resets the other property's scroll position

In order to set both at the same time (without either resetting to 0), use window.scrollTo.

Events

Key Events

The following buttons trigger the onkeydown, onkeypress and onkeyup events:

Code Button
13 A
37 Left
38 Up
39 Right
40 Down

The events cannot have their default action cancelled. Other buttons do not trigger key events.

Touch/Mouse Events

onmousedown, onmouseup & onclick are all triggered by the browser. However, the onmousedown event doesn't trigger until you lift the stylus or you've held it on the screen for ~2 seconds—which is when text selection mode is activated—making it pretty much the same as onmouseup. The events cannot have their default action cancelled.

The onmousemove and common touch/gesture events are not supported.

Screen Resolution

The up screen resolution is 400×240. However, the viewable area in the browser is only 400×220.

The touch screen resolution is 320×240. However, the viewable area in the browser is only 320×212.

You can have a page span both screens. However, the browser will behave as if the bottom screen is the only active screen and the top screen is scrolled off. This is important when computing CSS coordinates. Items positioned from "bottom" will be positioned based on 220px and not the full 432px of both screens.

Using Both Screens

Generally the easiest way to accomplish the correct layout is to create HTML elements that "contain" the top and bottom screens. Here's an example:

<!DOCTYPE html>
<html>
  <head>
    <meta name="viewport" content="width=400">
    <style>
      body{margin:0px;}
      #topscreen{width:400px;height:220px;overflow:hidden;}
      #bottomscreen{width:320px;height:212px;overflow:hidden;margin:0 auto;}
    </style>
  </head>
  <body>
    <div id="topscreen">Top Screen</div>
    <div id="bottomscreen">Bottom Screen</div>
  </body>
</html>

This scheme allows the page to be easily manipulated through JavaScript. In order to have the window snap to the correct position, use the following JavaScript code:

window.setInterval(function () {
    window.scrollTo(40, 220);  
}, 50);

This automatically resets the position if the user accidentally scrolls the page.

Example Sites