GitHub Issue | n/a |
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2014-05-13T00:38:58.000+0000 |
Affected Version/s | n/a |
Fix Version/s | 2014 Sprint 10, 2014 Sprint 10 Tooling, Release 3.3.0 |
Components | Windows Hybrid |
Labels | n/a |
Reporter | Jamil Spain |
Assignee | Chris Barber |
Created | 2014-05-07T17:41:34.000+0000 |
Updated | 2017-03-03T21:32:54.000+0000 |
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.
Can you please provide a test case?
How is this possible?
added to the ticket ( the test case from client )
The attached test case does not exhibit any sort of issue that the title describes. Perhaps the attachment was meant TIMOB-16933.
I cannot reproduce the problem here.
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 usewindow.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 referencesdocument.domain
to determine the domain of the parent window. The problem is when you inject HTML, there is no domain. Whenever you referencedocument.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 examinelocation.hostname
, however in the parent document this is an empty string and in an included script it is "about.blank". In short, you cannot referencedocument.domain
period. You can try to referencelocation.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.Closing as invalid.