readyList.resolveWith( document, [ jQuery ] );
// Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
+ if ( jQuery.fn.triggerHandler ) {
+ jQuery( document ).triggerHandler( "ready" );
+ jQuery( document ).off( "ready" );
}
}
});
--- /dev/null
+<!doctype html>
+<html>
+<head>
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
+ <title>alias-masked DOM properties (#14074)</title>
+ <script>
+ var error = false;
+ window.onready = function() { error = "Called window.onready"; };
+ </script>
+ <script src="../../jquery.js"></script>
+</head>
+<body>
+ <form>
+ <input type="text" id="nodeName"/>
+ </form>
+ <script>
+ jQuery(function() {
+ setTimeout( function() {
+ window.parent.iframeCallback( error );
+ });
+ });
+ </script>
+</body>
+</html>
\ No newline at end of file
deepEqual( errors, [], "jQuery loaded" );
}
);
+
+testIframeWithCallback( "Don't call window.onready (#14802)", "core/onready.html",
+ function( error ) {
+ expect( 1 );
+ equal( error, false, "no call to user-defined onready" );
+ }
+);