PHP Classes

File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/classes/util/JSONP.js

Recommend this page to a friend!
  Classes of Jules Warner   WICMS   WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/classes/util/JSONP.js   Download  
File: WITheme/WICMS/admin/js/plugins/textEditor/tinymce_4.2.6_dev/tinymce/js/tinymce/classes/util/JSONP.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 7 years ago
Size: 780 bytes
 

Contents

Class file image Download
/** * JSONP.js * * Released under LGPL License. * Copyright (c) 1999-2015 Ephox Corp. All rights reserved * * License: http://www.tinymce.com/license * Contributing: http://www.tinymce.com/contributing */ define("tinymce/util/JSONP", [ "tinymce/dom/DOMUtils" ], function(DOMUtils) { return { callbacks: {}, count: 0, send: function(settings) { var self = this, dom = DOMUtils.DOM, count = settings.count !== undefined ? settings.count : self.count; var id = 'tinymce_jsonp_' + count; self.callbacks[count] = function(json) { dom.remove(id); delete self.callbacks[count]; settings.callback(json); }; dom.add(dom.doc.body, 'script', { id: id, src: settings.url, type: 'text/javascript' }); self.count++; } }; });