On Thu, Jun 28, 2012 at 12:36 PM, John Arthorne
<John_Arthorne@xxxxxxxxxx> wrote:
The problems seem to be wider than just
the editor. We have examples that show embedding a very basic Orion editor
and I think they are fairly straight-forward. The trick is when you want
to start pulling in more scripts for outlining, highlighting, content assist,
etc. In theory require.js helps with wiring up all the inter-script dependencies,
but you need a main require.js configuration that maps all the source locations
to module names.
The scarier problem that Andy mentioned is that even once
you do this, there are timing problems if the scripts aren't loaded/run
in the same order as we have in Orion. These are the cases we need to track
down and figure out how to make our code less brittle.
I think this problem may be described slightly differently: conventional synchronization techniques like iframe onload events just do not work with require.js scripts. The symptom will be intermittent failure during start up. Editor embedders must explicitly block any code that may use the editor until the completion of the script loading at the end of the top level require() call.
jjb