fwextensions / fwrequirejs Goto Github PK
View Code? Open in Web Editor NEWA version of RequireJS for Adobe Fireworks extensions that use JavaScript.
License: MIT License
A version of RequireJS for Adobe Fireworks extensions that use JavaScript.
License: MIT License
Hi John, we talked on twitter. I'm creating a github issue since it will be easier to talk about code this way, and we hopefully both will get notifications of updates.
I just looked at the current fwrequire.js and its override of requirejs.load(). It looks fine, the use of requirejs.onError() will end with a throw. The fireworks env looks like it is sync script loading/evaluation, which simplifies some things.
I assume in the context of fireworks JS, you really do want a throw of an error if there was no script at that location. 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. We can get more into that if you are interested, but what you have now works with the global onError throwing that is used when there are no errbacks on a module.
My first thought though is that you want load errors bubbled pretty quickly via exception vs. allowing for handling the error in the errback of a particular require call. You have probably already seen this, but here are some notes on error handling in requirejs.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.