Code Monkey home page Code Monkey logo

Comments (1)

fwextensions avatar fwextensions commented on September 20, 2024

Hmm, I guess I forgot to save my comment before committing the fix...

Thanks for the detailed reply!

The fireworks env looks like it is sync script loading/evaluation, which simplifies some things.

Yes, calling fw.runScript(url) tells the app to synchronously load and evaluate a script. There’s no way to do async loading.

If you wanted to tie into the errbacks use in requirejs 2.0, that would take a bit more work, playing with some of the internals.

I was mostly wondering whether there was a defined way for adapters to handle errbacks and path fallbacks, just so I could do the right thing. But I’m not sure it's actually needed this in this environment, as there’s no way to load anything over the wire. If a required script doesn’t exist at the specified path, it's a bug, and it should be caught before a developer releases the script.

You could format the error so that it has an error.requireModules = [moduleName] instead of error.module = moduleName;, and use an error.requireType = 'scripterror', if you want it to look more like an error that is generated from the regular requirejs code.

That’s a good idea. I’ll add that.

from fwrequirejs.

Related Issues (1)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.