Closed Bug 514179 Opened 16 years ago Closed 16 years ago

embedded editor web workers require javascript in /js/bespin

Categories

(Skywriter Graveyard :: Editor, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alex, Unassigned)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9 Build Identifier: Web workers depend on bespin’s JavaScript being in a particular location: “/js/bespin/“ Reproducible: Always Steps to Reproduce: 1. Set up a web environment with Bespin’s JavaScript at some directory other than /js/ (for instance, /app/js/) 2. Embed the Bespin editor in a page (for instance, /app/index.html). You could likely use frontend/tests/manual/editor/singleeditor.html to test it. 3. Attempt to run the app. Actual Results: The app will likely crash, because the web workers will not work, and are referenced by parser.js and codecompletion.js. Expected Results: The web workers should work by using a path relative to the rest of bespin. I think that this can be solved by using dojo.moduleUrl. I have not yet tried it. I have a partial patch that simply changes the attempt at using /js/bespin/bootstrap_worker.js to reference the constant JS_WORKER_SOURCE. While not complete, it would make the above test case work, since JS_WORKER_SOURCE uses a relative path (then you’d only need to have a js/bespin directory in the same directory as your index.html). I’m willing to work on a more complete patch.
Attached patch Partial patchSplinter Review
This patch also addresses several other bugs which I am in the process of submitting.
Status: UNCONFIRMED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: