Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Documentation? Running curl from the browser console. #74

SimplGy opened this Issue · 4 comments

2 participants


I think this is not allowed, but it would be great to know that for sure and be able to read a brief explanation of why. Is the console not allowed to add scripts? Does curl not have the same access to executing code in the console?


This works in an included JS module, but not from the console. Am I doing something wrong trying to run this in Chrome or Firefox's console?


Hey @SimpleAsCouldBe!

I see two minor issues with your code snippet.

  1. Anonymous modules only work if the loader can figure out the module id from the file name. Just add a module id and it'll work.

  2. The call to lightbox will execute immediately upon module definition. If you want a module that you can call repeatedly, you should have it return a function:

    define('myModule', ['components/lightbox'],function (lightbox){
    return function () {

Try that. :)

-- John

@unscriptable unscriptable was assigned

You are right. This needs to be documented. :)


I was mixed up. I'm doing a single-page app that only bootstraps in once.

I got so used to starting views with a 'define' that I forgot the application actually used 'curl' to kick everything off.

This works just fine against an already-defined curl module:

curl(['components/lightbox'], function(lightbox){

I added a page to the wiki (couldn't figure out how to put it in the right category though). Hope it helps, feel free to edit or delete if it's not what you're looking for.

@SimplGy SimplGy closed this

Wow, thanks Eric! I'm going to add some very minor adjustments and put it on the main page! -- J

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.