Skip to content

Cross domain ajax using JSONP #197

@jwestbrook

Description

@jwestbrook

previous lighthouse ticket #333
by Christopher Thomas


we should definitely look at how to port jquery's getJSON() method because it's just a very simple and easy way to obtain information from another website, without messing around building your own script handler.

I believe there was an attempt to make a <script> transport for prototype, to a degree, it worked, however it lacked the ability to use a callback when the contents of the tag were finally loaded (when usually you'd expect an onload event, there is none, so the callback method for JSONP allows you to insert a callback so when it executes, it's because the contents has loaded (otherwise the callbac wouldnt run either). The sample implementation that I tried was this:

http://ajaxian.com/archives/prototype-extension-dynamic-script-pattern-support

but it is not foolproof and with some work, it could provide us with a

The security problems this causes are merely in the hands of the developer if they should choose to use it, like in jquery, it's a gun, you point it at your website, or at your head, where you pull the trigger, is up to you. But I think this feature would really rock.</p>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions