Skip to content

External resources from POST don't load #2296

@smomapz

Description

@smomapz

Creation of fiddles via the POST API do not load external resources, scripts when the fiddle is opened.

Steps to Reproduce:

  1. Create a site with the form for the POST request:
<form method='post' target='check' action='http://jsfiddle.net/api/post/library/pure/'>
   <input name='resources' value="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js" />
  <input name='js' value="$('body').css('background','blue');" />
  <input type='submit' value="Create Fiddle" />
 </form>
  1. On this site click on the 'Create Fiddle'. This will open new jsFiddle window using the POST API.
  2. Notice that the background in the result has not turned blue and the internal console has error "[Line 2] Uncaught ReferenceError: $ is not defined"
  3. Click on the Resources in the sidebar and click Run again
  4. Now the script was loaded and it works.

It seems like the resources only get added when the Resources menu item got opened first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions