getScriptSet

码农软件 · 软件分类 · 其他jQuery插件 · 2020-01-15 20:42:10

软件介绍

Extends jQuery with our custom multi-resource asynchronous script receiver.

It ensures that the onLoaded callback will only be executed when all scripts have been loaded. It also maintains a cache of already loaded URL's to prevent multiple downloads. It also supports loading script that have their own loading mechanism, like Google Maps, by offering a way to take their callback and inject it into ourselves.

Resources are passed in the following style:

[
  "simple_javascript_file.js",
   {
      url: 'js_file_with_own_loader',
      callbackSetter: function(callback) {
        // The callback parameter is the callback that 'js_file_with_own_loader' _needs_
        // to call when it completes. So you could do it like this for example:
        module.addListener( 'onLoad', callback ) ;
        // Or you can check the example below for how it works with Google Maps e.g.
      }
  }
]

This is a sample resource definition for loading Google Maps with our own custom script that extends the Google Map object:
<code>
[ "my_google_maps_extension.js",
{ url: "http://maps.google.com/maps?file=api&v=2&key=" + GMAP_KEY + "&async=2&callback=_gmapsOwnOnLoadCallback",
  callbackSetter: function(callback) { self._gmapsOwnOnLoadCallback = callback }
} ]

本文地址:https://codercto.com/soft/d/23463.html

大转换

大转换

尼古拉斯·卡尔 / 闫鲜宁、张付国 / 中信 / 2016-2 / 49

1、我们这个时代最清醒的思考者之一尼古拉斯·卡尔继《浅薄》《玻璃笼子》之后又一重磅力作。 2、在这部跨越历史、经济和技术领域的著作中,作者从廉价的电力运营方式对社会变革的深刻影响延伸到互联网对我们生活的这个世界的重构性影响。 3、《快公司》《金融时报》《华尔街日报》联袂推荐 简介 早在2003年,尼古拉斯·卡尔先生发表在《哈佛商业评论》上的一篇文章——IT Doesn't ......一起来看看 《大转换》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换