Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Same domain load for SceneJS.Load broken

#60

IE. with no proxy on SceneJS.Scene, and URI in same domain. Works ok for SceneJS.LoadCollada, but for SceneJS.Load of remote teapot example:

Symptoms

Two cases present in which error occurs.

1) With URI of form http://scenejs.org/library/../asset.js the following error is reported:

Load failed - 0 - - uri: http://scenejs.org/library/v0.7/assets/examples/orange-teapot/orange-teapot.js
Scene destroyed: scene0
SceneJS reset
scene0: Loading asset from local domain http://scenejs.org/library/v0.7/assets/examples/orange-teapot/orange-teapot.js

2) When URI of form http://www.scenejs.org/library/../asset.js, the content is received but I neglected to actually evaluate it. This worked for the cross-domain load with this URI because the JSONP mechanism of inserting into a script tag took care of evaluation.

Solution

Assuming (1) is a same-domain security violation, report a suggestion to fix the URL's "www".
For (2), in SceneJS.Load do the following:

 SceneJS.Load.prototype._parse = function(data, onError) { 

if (data._render) {
  return data;
}
if (data.error) {
    onError(data.error);
}
try {
    var data = eval(data);  // Same-domain
    if (data.error) {
        onError(data.error);
    }
    return data;
} catch (e) {
    onError('Error parsing response: ' + e);



}

Reported by lindsay.kay (at xeolabs) · May 8th, 2010 @ 04:14 AM

State: resolved
Milestone: V0.7.4

Activity

  1. lindsay.kay (at xeolabs)
    lindsay.kay (at xeolabs)
    • State changed from open to resolved

    May 8th, 2010 @ 08:00 AM

  2. lindsay.kay (at xeolabs)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.