Skip to content

[Wait for jQuery 3.1.0 release] jQuery.readyException: Add the page, add the 3.1 category #946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions categories.xml
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,12 @@ var files = event.originalEvent.dataTransfer.files;
<hr/>
]]></desc>
</category>
<category name="Version 3.1" slug="3.1">
<desc><![CDATA[
<p><a href="/jQuery.readyException">jQuery.readyException</a> was added.</p>
<hr/>
]]></desc>
</category>
<category name="All" slug="all"/>
</category>
</categories>
24 changes: 24 additions & 0 deletions entries/jQuery.readyException.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0"?>
<entry type="method" name="jQuery.readyException" return="Selector">
<title>jQuery.readyException()</title>
<desc>Handles errors thrown synchronously in functions wrapped in <code>jQuery()</code>.</desc>
<signature>
<added>3.1</added>
<argument name="error" type="Error">
<desc>An error thrown in the function wrapped in <code>jQuery()</code>.</desc>
</argument>
</signature>
<longdesc>
<p>This method is fired when an error is thrown synchronously in a function wrapped in <code>jQuery()</code> or <code>jQuery( document ).ready()</code>, or equivalent. By default it re-throws the error in a timeout so that it's logged in the console and passed to <code>window.onerror</code> instead of being swallowed. Overwrite this method if you want to handle such errors differently.</p>
</longdesc>
<example>
<desc>Pass the received error to <code>console.error</code>.</desc>
<code><![CDATA[
jQuery.readyException = function( error ) {
console.error( error );
};
]]></code>
</example>
<category slug="core"/>
<category slug="version/3.1"/>
</entry>