Skip to content

mardambey/highway

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

### What is Highway?

Parallel fetching and rendering JavaScript library with dependency
resolving.

### Example:

The following example loads a few slices in order using dependencies. One of
the slices has an "onafterload" callback.

```
<script type="text/javascript">
function centerContentCompleteCb()
{
	$("#centercontent").html($("#centercontent").html() + "<br>And completion	cb fired!");
}
</script>

<script type="text/javascript">

var highway = new Highway();

highway.getSlice({
	"id":"header",
	"url":"slices2/header.php",
	"requires":[]
});

highway.getSlice({
	"id":"footer",
	"url":"slices2/footer.php",
	"requires":[]
});

highway.getSlice({
	"id":"centercontent",
	"url":"slices2/centercontent.php",
	"requires":["right", "left"],
	"onafterload":[centerContentCompleteCb]
});

highway.getSlice({
	"id":"left",
	"url":"slices2/left.php",
	"requires":["header"]
});

highway.getSlice({
	"id":"right",
	"url":"slices2/right.php",
	"requires":["left"]
});

</script>
```

About

Parallel fetching and rendering JavaScript library with dependency resolving.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published