Project

Profile

Help

Support #1845

closed

LogConfiguration error in Firefox on asynchronous callback

Added by Martynas Jusevicius about 11 years ago. Updated about 11 years ago.

Status:
Resolved
Priority:
Normal
Sprint/Milestone:
-
Start date:
2013-07-16
Due date:
% Done:

100%

Estimated time:
Platforms:

Description

I was trying to handle callback from jQuery.ajax() asynchronous HTTP request in Saxon-CE.

I used the technique described by Philip here: http://saxon-xslt-and-xquery-processor.13853.n7.nabble.com/Saxon-CE-and-callback-functions-tp741p742.html

The code:

<script type="text/javascript">	    
var baseUri = 'http://localhost:8080/semantic-reports/';
function loadTypeaheadXML(query)
{
    var searchUri = UriBuilder.fromUri(baseUri).
	segment('search').
	queryParam('query', query).
	build();
    $.ajax({url: searchUri,
	headers: { 'Accept': 'application/rdf+xml', 'Authorization': 'Basic XXXXXXXXXXXXXXXXXXXXXXXX=' }
    }).
    done(function(data, textStatus, jqXHR)
    {
	ontypeaheadCallback(); // expected to invoke "ixsl:ontypeaheadCallback" template
    } ).
    fail(function(jqXHR, textStatus, errorThrown)
    {
	alert(errorThrown);
    });
}
</script>
    <xsl:template match="input[contains(@class, 'resource-typeahead')]" mode="ixsl:onkeyup">
	<xsl:call-template name="load-typeahead-xml">
	    <xsl:with-param name="query" select="@prop:value"/>
	</xsl:call-template>
    </xsl:template>
  
    <xsl:template name="load-typeahead-xml">
	<xsl:param name="query" as="xs:string"/>
	<xsl:value-of select="ixsl:call(ixsl:window(), 'loadTypeaheadXML', $query)"/>
    </xsl:template>

    <xsl:template match="ixsl:window()" mode="ixsl:ontypeaheadCallback">
	<xsl:message>CALLBACK!</xsl:message>
    </xsl:template>

When typing into input with @class 'resource-typeahead', Chrome asynchronously logs "INFO: CALLBACK!", as expected.

Firefox 22.0 throws an error instead:

SaxonCE.com.google.gwt.logging.client.LogConfiguration 16:37:49.707
SEVERE: (TypeError) 
 fileName: http://localhost:8080/semantic-reports/static/js/saxon-ce/7FFD07C49946B3F4B1DE49E72F7E85FA.cache.html
 stack: Mr@http://localhost:8080/semantic-reports/static/js/saxon-ce/7FFD07C49946B3F4B1DE49E72F7E85FA.cache.html:1685
Jr@http://localhost:8080/semantic-reports/static/js/saxon-ce/7FFD07C49946B3F4B1DE49E72F7E85FA.cache.html:60
b[a]<@http://localhost:8080/semantic-reports/static/js/saxon-ce/7FFD07C49946B3F4B1DE49E72F7E85FA.cache.html:75
@http://localhost:8080/semantic-reports/static/js/saxon-ce/7FFD07C49946B3F4B1DE49E72F7E85FA.cache.html:1912
@http://localhost:8080/semantic-reports/persons?mode=http%3A%2F%2Fclient.graphity.org%2Fontology%23InputMode:50
jQuery.Callbacks/fire@http://code.jquery.com/jquery.js:3048
jQuery.Callbacks/self.fireWith@http://code.jquery.com/jquery.js:3160
done@http://code.jquery.com/jquery.js:8235
.send/callback@http://code.jquery.com/jquery.js:8778

 lineNumber: 1685
 columnNumber: 324: a is undefined
http://localhost:8080/semantic-reports/static/js/saxon-ce/7FFD07C49946B3F4B1DE49E72F7E85FA.cache.html
Line 876

Files

firefox.xsl (836 Bytes) firefox.xsl Martynas Jusevicius, 2013-07-23 16:00
saxonce.html (1 KB) saxonce.html Martynas Jusevicius, 2013-07-23 16:00
typeahead.xml (85 Bytes) typeahead.xml Martynas Jusevicius, 2013-07-23 16:00

Please register to edit this issue

Also available in: Atom PDF