midori JavaScript Framework

midori is an ultra-lightweight[1] JavaScript library that aims to make JavaScript web development easier. It was created by Aycan Gulez and hasn't been updated since June 2010.

midori
Developer(s)Aycan Gulez
Stable release
2010.05 / May 10, 2010 (2010-05-10)
Written inJavaScript
TypeWeb application framework
LicenseMIT License
Websitehttp://www.midorijs.com

Features

Use

midori consists of 10 modules and is available as a single JavaScript file. It can be included within any web page by using the following markup:

<script type="text/javascript" src="path/to/midori.js"></script>

midori allows the use of standard CSS syntax to access DOM elements, and supports most CSS2 and CSS3 selectors.[2] There are three ways to work on returned DOM elements.

  • Passing JavaScript code to modify a single property, using the built-in apply() method:
// Sets the background color of all the cells in even rows to "yellow" in the "cities" table
midori.get('#cities tr:nth-child(even) td').apply('style.backgroundColor = "yellow"');
  • Passing a function that takes a single parameter for more complex operations, again using the apply() method:
// Marks the cells whose values are 12 or bigger in the "cities" table
midori.get('#cities td').apply(function (o) {
  if (parseInt(o.innerHTML) >= 12) o.style.backgroundColor = 'red';
});
  • Directly accessing array entries returned by midori.get() is also possible.
// Returns the first div element
var firstDiv = midori.get('div')[0];
gollark: You can use its external parallel serial interfaces™ to connect G🐝³1101<:based:826232919293952001>GQ8+FN pin extenders too.
gollark: Really?
gollark: I should not.
gollark: Of course, we sometimes silently alter it for no particular reason, so ones produced now also incorporate high sensitivity apiometers, apioyards and apioapiforms.
gollark: Featuring:- 512-bit CPU core supporting GCIS02-2027 instruction set - 3 exabytes of persistent memory- 17 bytes of RAM- 10^11 pins (nanoscale)- clock up to 1222YHz (please ensure sufficient cooling) or asynchronous mode- built-in RGB lighting- has power management CPU with its own power management CPU 6 levels deep- 1Tbps Ethernet (40Gbps backward compatibility mode)

References

This article is issued from Wikipedia. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.