New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

lockandload

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lockandload - npm Package Compare versions

Comparing version 1.1.18 to 1.2.5

2

lastjs.js

@@ -1,1 +0,1 @@

define(Date);
define({});
{
"name": "lockandload",
"version": "1.1.18",
"version": "1.2.5",
"description": "Minimalist AMD-compliant Javascript and CSS loader",

@@ -5,0 +5,0 @@ "main": "index.html",

@@ -20,10 +20,12 @@ <h1>lockandload AMD-loader</h1>

- Supports anonymous define() calls.
- Supports local require() calls (with one and two arguments).
- Supports implicit and explicit ['require'] dependencies.
- Does not support implicit nor explicit exports/module dependencies.
- Circular dependencies will silently hang in unresolved state
(or put differently: do not do that).
- Supports local require() calls (with one and two arguments, RequireJS-style).
- Supports implicit and explicit ['require', 'exports', 'module'] dependencies.
- Explicit circular dependencies will silently hang in unresolved state
(or put differently: do not do that), use 'exports' or 'require' to resolve
those instead.
- No extra diagnostic code to minimise code weight and optimise loading speed.
- Does not support require.toUrl() nor simplified CommonJS wrapping.
- Fully event driven, no polling timers.
- Standard supported dependencies: `require` and `domready`.
- Standard supported dependencies: `require`, `exports`, `module`
and `domready`.
- Both high and low priority asynchronous loading of Javascript and CSS files.

@@ -40,2 +42,3 @@ - Leverages native browser speed for high priority loading (by getting out

than the source of all the added functionality.
- Integrated hooks for Google Tag Manager (GTM) support.

@@ -56,5 +59,5 @@ ## Requirements

on the page.
- `lockandload_headready.inc`: The start of the headready script that
- `lockandload_headready.inc`: The start of the headready-script that
lives at the end of the `<head>`.
- `lockandload_trailer.inc`: The end of the headready script that lives
- `lockandload_trailer.inc`: The end of the headready-script that lives
at the end of the `<head>`.

@@ -97,3 +100,3 @@ - `index.php`: PHP boilerplate.

- All other tags that should go in the `<head>`.
- Inline `lockandload` 'headready' script.
- Inline `lockandload` headready-script.
- CSS scripts fullfilling a custom applied-style dependency.

@@ -123,9 +126,11 @@ - Low priority CSS scripts.

Running `define(1, dependencies, factory)` is a custom extension and is
the same as the traditional global `require(dependencies, factory)`.
It is used in the existing scripts to avoid defining the global
`require()`.
If you are in need of the common global `require(dependencies, factory)`,
insert the following code into the loader (preferably in the custom-code
section of the secondary headready-script):
```javascript
function require(d, f) { define(1, d, f); }
```
### Locally
In the secondary `lockandload` 'headready' script; all url arguments
In the secondary `lockandload` headready-script; all url arguments
are used verbatim in `<link href="url">` or `<script src="url">` tags:

@@ -146,3 +151,3 @@ - `css(url, id?)`<br />

The standard `headready` script contains a dependency on `domready` and
The standard headready-script contains a dependency on `domready` and
`jquery` which finally runs `domready(1)` which will run all the

@@ -158,3 +163,9 @@ registered delayed functions the first time.

To run the registered functions, one needs to make a call to the entrypoint
of the AMD-dependency on `domready` without arguments. All `domready()`
of the AMD-dependency on `domready` without parameters or with exactly
one parameter; if not provided, this single parameter will default to
`$(document)` (the jquery object/scope referring to the whole document).
Convention states that if provided the argument should normally be the jquery
object referring to the element tree that contains the changes.
Ultimately you decide what your `$$(function(argument){...})` scheduled
scripts will use the argument for. All `domready()`
calls before `domready(1)` has been run will silently be ignored.

@@ -171,3 +182,7 @@

// The function that gets called on virtual page refreshes
domready(); // This will call all registered $$(...) functions
var newdiv = $("#contentdiv");
newdiv.html("your glorious new page content");
domready(newdiv); // This will call all registered $$(...) functions
// with the newdiv as argument to potentially
// limit the scope of the changes
}

@@ -181,5 +196,7 @@ });

- To install it use the
[npm repository](https://www.npmjs.com/package/lockandload).
- [source repository](https://github.com/BuGlessRB/lockandload).
- [Sample site that uses lockandload](https://remixml.org/).
[lockandload AMD-loader](https://www.npmjs.com/package/lockandload)
npm repository.
- [lockandload AMD-loader](https://github.com/BuGlessRB/lockandload)
source repository.
- Sample site that uses lockandload: [Remixml](https://remixml.org/).
- [Asynchronous Module Definition

@@ -196,1 +213,3 @@ (AMD)](https://github.com/amdjs/amdjs-api/blob/master/AMD.md).

- [curl](https://github.com/cujojs/curl).
- [Dojo Toolkit](https://dojotoolkit.org/).
- [lsjs](https://github.com/zazl/lsjs).

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc