[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Juraj Húska commented on ARQGRA-455:
------------------------------------
Thanks [~okiss], it resolved also the problems with fileUpload testing.
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
> Assignee: Oliver Kišš
> Fix For: 2.0.4.Final
>
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 4 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-455:
------------------------------
Status: Resolved (was: Pull Request Sent)
Resolution: Done
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
> Assignee: Oliver Kišš
> Fix For: 2.0.4.Final
>
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 4 months
[JBoss JIRA] (ARQGRA-455) Guarded XHR2 request fails when its onload callback is JQuery proxy
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-455?page=com.atlassian.jira.plugin... ]
Lukáš Fryč updated ARQGRA-455:
------------------------------
Fix Version/s: 2.0.4.Final
> Guarded XHR2 request fails when its onload callback is JQuery proxy
> -------------------------------------------------------------------
>
> Key: ARQGRA-455
> URL: https://issues.jboss.org/browse/ARQGRA-455
> Project: Arquillian Graphene
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: core
> Affects Versions: 2.0.3.Final
> Reporter: Juraj Húska
> Assignee: Oliver Kišš
> Fix For: 2.0.4.Final
>
>
> If Graphene is guarding an AJAX request, which {{onload}} callback is JQUery proxy, then it fails. There is a problem with arguments passing.
> *XHR2 request*:
> {code:javascript}
> function makeXHR2() {
> var xhr = new XMLHttpRequest();
> xhr.open("GET", "sample1.html", true);
> xhr.responseType = 'text';
>
> xhr.onload = $.proxy(function (e) {
> switch (e.target.status) {
> case 200:
> console.log('HTTP 200');
> break;
> default:
> console.log('HTTP 500');
> }
>
> var responseContext = {
> }
> }, this);
>
> xhr.send(null);
> }
> {code}
> In browser console there is an error that states:
> {code}
> e.target is undefined
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.6#6264)
10 years, 4 months