Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16928] Windows Hybrid: isScriptEnabled does not load on first Browser Instance

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionInvalid
Resolution Date2014-05-13T00:38:58.000+0000
Affected Version/sn/a
Fix Version/s2014 Sprint 10, 2014 Sprint 10 Tooling, Release 3.3.0
ComponentsWindows Hybrid
Labelsn/a
ReporterJamil Spain
AssigneeChris Barber
Created2014-05-07T17:41:34.000+0000
Updated2017-03-03T21:32:54.000+0000

Description

The first time you initialize a Microsoft.Browser object and set the isScriptEnabled: true, it does not load for the first page. Always renders on the 2nd instance or on the next reloading.

Attachments

FileDateSize
csstester.zip2014-05-09T21:24:10.000+00007510328

Comments

  1. Ingo Muschenetz 2014-05-07

    Can you please provide a test case?
  2. Chris Barber 2014-05-07

    How is this possible?
  3. Jamil Spain 2014-05-09

    added to the ticket ( the test case from client )
  4. Chris Barber 2014-05-10

    The attached test case does not exhibit any sort of issue that the title describes. Perhaps the attachment was meant TIMOB-16933.
  5. Chris Barber 2014-05-12

    I cannot reproduce the problem here.
  6. Chris Barber 2014-05-13

    I was able to reproduce the problem. The problem stems from how they are using the WebBrowser object, specifically with injecting HTML into the WebBrowser object. To be clear, JavaScript is enabled, CSS is working, and I believe the actual behavior is the expected behavior. When injecting HTML into a WebBrowser instance, it appears that embedded script tags have limitations. For example, window.addEventListener() is not available. You must use window.attachEvent(). I believe this to be a bug with Windows Phone 8/Internet Explorer 9. The limitation that is causing issues when an included script references document.domain to determine the domain of the parent window. The problem is when you inject HTML, there is no domain. Whenever you reference document.domain, all subsequent JavaScript in that script block or JS file fails execute. There are no errors thrown. You cannot override document.domain either. It's read only. You can examine location.hostname, however in the parent document this is an empty string and in an included script it is "about.blank". In short, you cannot reference document.domain period. You can try to reference location.hostname, but the value it returns depends on the context. There are probably more limitations, but those are outside the scope of this ticket. Resolving this ticket as invalid.
  7. Eric Merriman 2017-03-03

    Closing as invalid.

JSON Source