SkillAgentSearch skills...

Slowscript

javascript lazyload unit able with AMD

Install / Use

/learn @flrngel/Slowscript
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

slowscript

javascript lazyloader with Mutation Detection

Usage

<script type="text/slowscript" src="test.js"></script>
<script type="text/slowscript" src="test"></script>

recommend

<noscript type="text/slowscript" src="test.js"></noscript>

On AMD ( Example with RequireJS )

See more RequireJS-example

require(['slowscript'],function(slowscript){
	slowscript.execute();
});

Development

npm install
grunt

Examples

Basic examples

AngularJS examples


Basics

slowscript is using singleton design pattern.

Variables

$global

Advantage of singleton design pattern, you can use this variable as global variable.

Method

execute()

This method is for execute slowscript as hand-operated

on mutation event, this method will run automatically. (plan to choose optional on future version)

queue(<function>)

This method is for queuing predefined functions, wait for queue to execute.

queue_execute()

This method executes functions in queue which is defined. Probably uses on lazy-loaded script.

LICENSE

MIT

View on GitHub
GitHub Stars4
CategoryDevelopment
Updated7y ago
Forks0

Languages

JavaScript

Security Score

70/100

Audited on Jan 2, 2019

No findings