mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
N°5621 Move jquery-migrate 3.1.0 to NPM
This commit is contained in:
55
node_modules/jquery-migrate/test/event-props.html
generated
vendored
Normal file
55
node_modules/jquery-migrate/test/event-props.html
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>jQuery Migrate event props iframe test</title>
|
||||
|
||||
<!-- Load a jQuery and jquery-migrate plugin file based on URL -->
|
||||
<script src="testinit.js"></script>
|
||||
<script>
|
||||
TestManager.loadProject( "jquery", "git" );
|
||||
</script>
|
||||
<script src="iframeTest.js"></script>
|
||||
<script>
|
||||
jQuery.noConflict();
|
||||
TestManager.loadProject( "jquery-migrate", "dev", true );
|
||||
</script>
|
||||
<script>
|
||||
function dispatchEvent( elem, type ) {
|
||||
var e = document.createEvent( "HTMLEvents" );
|
||||
e.initEvent( type, true, true );
|
||||
elem.dispatchEvent( e );
|
||||
}
|
||||
|
||||
function runTest() {
|
||||
var test1, test2,
|
||||
div = document.createElement( "div" ),
|
||||
$div = jQuery( div ).appendTo( document.body );
|
||||
|
||||
$div.on( "blend", function( event ) {
|
||||
test1 = ( "whip" in event ) && ( "chop" in event );
|
||||
|
||||
// Props added later are also processed
|
||||
jQuery.event.props.push( "frappe" );
|
||||
dispatchEvent( div, "puree" );
|
||||
} );
|
||||
|
||||
$div.on( "puree", function( event ) {
|
||||
test2 = ( "whip" in event ) && ( "frappe" in event );
|
||||
|
||||
// 2 prop warnings ( chop+whip and frappe )
|
||||
startIframeTest( test1, test2 );
|
||||
} );
|
||||
|
||||
// Multiple props, processed with a single warning
|
||||
jQuery.event.props.push( "chop", "whip" );
|
||||
dispatchEvent( div, "blend" );
|
||||
}
|
||||
|
||||
jQuery( runTest );
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<p>jQuery Migrate</p>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user