event-hover-tests.js revision 8c0728da50e402de1837852ea5482ccd74c230f7
73cf5b20418beae941f34ec39a8d87035ae01711Luke Smith testbed = body.create('<div id="testbed"></div>');
73cf5b20418beae941f34ec39a8d87035ae01711Luke Smith '<ul id="items">' +
7b4d1363155303b5bfb852e5639b851bbd4dc255Luke Smith '<li id="item1">' +
680f13616a493c7bf3a794982e07d10abd9763b3Luke Smith '<div id="div1"><p id="p1"># <em id="em1">1</em></p></div>' +
680f13616a493c7bf3a794982e07d10abd9763b3Luke Smith '<li id="item2">' +
fb83a09fe023a741781ee955f4e9538d3cbe21a2Luke Smith '<div id="div2"><p id="p2"># <em id="em2">2</em></p></div>' +
fb83a09fe023a741781ee955f4e9538d3cbe21a2Luke Smith '<li id="item3">' +
fb83a09fe023a741781ee955f4e9538d3cbe21a2Luke Smith '<div id="div3"><p id="p3"># <em id="em3">3</em></p></div>' +
fb83a09fe023a741781ee955f4e9538d3cbe21a2Luke Smith var eventname = (out) ? 'mouseout' : 'mouseover',
680f13616a493c7bf3a794982e07d10abd9763b3Luke Smith ancestors = Y.one(target).ancestors(function(node) {
030b855bbf1937a46e1e2b88025d61e72a205469Luke Smith for (i = 1, len = ancestors.size(); i < len; ++i) {
030b855bbf1937a46e1e2b88025d61e72a205469Luke Smith "test node.on('hover', over, out)": function () {
030b855bbf1937a46e1e2b88025d61e72a205469Luke Smith overType, outType, overPhase, outPhase, overEType, outEType,
030b855bbf1937a46e1e2b88025d61e72a205469Luke Smith overTarget, outTarget, overCurrentTarget, outCurrentTarget,
030b855bbf1937a46e1e2b88025d61e72a205469Luke Smith function over(e) {
030b855bbf1937a46e1e2b88025d61e72a205469Luke Smith function out(e) {
10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85Luke Smith "test container.on('hover', over, out)": function () {
7b4d1363155303b5bfb852e5639b851bbd4dc255Luke Smith overType, outType, overPhase, outPhase, overEType, outEType,
7b4d1363155303b5bfb852e5639b851bbd4dc255Luke Smith overTarget, outTarget, overCurrentTarget, outCurrentTarget,
7b4d1363155303b5bfb852e5639b851bbd4dc255Luke Smith function over(e) {
7a925457f765fe5ea2507b4629476fa3e100e4eeTodd Kloots function out(e) {
10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85Luke Smith "test Y.on('hover', over, out, '#foo')": function () {
10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85Luke Smith overType, outType, overPhase, outPhase, overEType, outEType,
10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85Luke Smith overTarget, outTarget, overCurrentTarget, outCurrentTarget,
10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85Luke Smith function over(e) {
3e72e854188ef0c1927857102f15b449dc598fafLuke Smith function out(e) {
fb83a09fe023a741781ee955f4e9538d3cbe21a2Luke Smith "test nodelist.on('hover', over, out)": function () {
7b4d1363155303b5bfb852e5639b851bbd4dc255Luke Smith function over(e) {
7b4d1363155303b5bfb852e5639b851bbd4dc255Luke Smith function out(e) {
overType = [],
overPhase = [],
overEType = [],
overTarget = [],
overCurrentTarget = [],
overRelTarget = [],
overThisObj = [],
outType = [],
outPhase = [],
outEType = [],
outTarget = [],
outCurrentTarget = [],
outRelTarget = [],
outThisObj = [],
overContainer = [],
outContainer = [];
function over(e) {
overCount++;
function out(e) {
outCount++;
function over(e) {
overCount++;
overThisObj = this;
function out(e) {
outCount++;
outThisObj = this;
function over(e) {
overCount++;
overThisObj = this;
function out(e) {
outCount++;
outThisObj = this;