×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Nokia Developer Champion
    Join Date
    Nov 2009
    Posts
    200

    Difference executing javascript in web apps and web pages

    How S40 distributed browser executes javascript in normal web pages and in web apps?

    This is specifically about how jquery mobile works differently in web pages in in web apps.

    If this example template below is opened in S40 web browser jquery mobile styles are applied as expected.
    http://jquerymobile.com/demos/1.2.1/...-template.html
    http://tinyurl.com/bwuz5f8 (short link)

    If this same exact page is packaged as a web app, jquery mobile styling doesn't work at all.
    http://goo.gl/mc1Y8?type=webapp (link to web app)

    Jquery mobile styles are applied on page load when jqm javascript code adds css styles to DOM. Because this works differently in web page and in web app, I am assuming that javascript is handled differently between these two cases. Am I right or is there something else behind this?

  2. #2
    Registered User
    Join Date
    Mar 2013
    Location
    United Kingdom
    Posts
    161

    Re: Difference executing javascript in web apps and web pages

    Unfortunately, the S40 Browser provides stripped down Javascript support. A list of unsupported Javascript events (many of which that JQuery relies upon) is listed in the API reference guide, see page 11 - http://tools.nokia.com/wt/doc/jsdt/s..._Reference.pdf

    There seems to be a few examples on the Wiki that use unsupported JQuery. These seem to be creating a lot of ambiguity, so perhaps we need to look at removing them? If I get time myself, perhaps I can knock together a Wiki article that shows which components are supported in the Nokia Browser and which components aren't supported.

  3. #3
    Nokia Developer Champion
    Join Date
    Nov 2009
    Posts
    200

    Re: Difference executing javascript in web apps and web pages

    Problem, or the question, isn't what is supported, but why browser works differently in browser mode and web app mode. As I understand web pages and web apps are handled essentially the same way.

    Jquery and Jquery Mobile seems to work just fine in normal web pages. Of course there's some limitations for javascript execution time, for example long polling or any other long lasting operations wouldn't work. For web apps jqm seems to be no-go, and I am wondering why.

  4. #4
    Nokia Developer Moderator
    Join Date
    Jun 2008
    Location
    Tampere
    Posts
    833

    Re: Difference executing javascript in web apps and web pages

    Quote Originally Posted by mikkovtr View Post
    Problem, or the question, isn't what is supported, but why browser works differently in browser mode and web app mode. As I understand web pages and web apps are handled essentially the same way.

    Jquery and Jquery Mobile seems to work just fine in normal web pages. Of course there's some limitations for javascript execution time, for example long polling or any other long lasting operations wouldn't work. For web apps jqm seems to be no-go, and I am wondering why.
    Hi,

    Actually Browser uses different back-end for browsing and for Web Apps.
    Web Apps back-end is tailored for Web App usage.

    That causes the differences you see in jQuery support etc..

    Br,
    Ilkka

  5. #5
    Nokia Developer Champion
    Join Date
    Nov 2009
    Posts
    200

    Re: Difference executing javascript in web apps and web pages

    OK, that explains a lot thank you.

    Now there is of course a question why web app backend seems to be worse, at least in this perspective..

Similar Threads

  1. Replies: 3
    Last Post: 2011-11-09, 14:00
  2. Replies: 9
    Last Post: 2011-05-15, 22:10
  3. Replies: 3
    Last Post: 2008-02-09, 13:05
  4. how to retrieve saved pages (.wml pages)
    By karen_cat in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2005-01-30, 22:23
  5. Nokia 9210 cant read JavaScript web pages
    By barnsley in forum Symbian
    Replies: 0
    Last Post: 2004-08-24, 14:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •