const result = arr1.filter(x => !arr2.find(y => x.name === y.name));
$('.page-content_results').on('click', '.next-page', function(){
$('.pagination li:nth-last-child(2)>a').click();
return false;
});
<img src="invalid/link" onerror="handleImageLoadError()"/>
function testImage(URL) {
var tester=new Image();
tester.onload=imageFound;
tester.onerror=imageNotFound;
tester.src=URL;
}
function imageFound() {
alert('That image is found and loaded');
}
function imageNotFound() {
alert('That image was not found.');
}
testImage("http://foo.com/bar.jpg");
const { emptyText, ... } = this.props;
const { spinnerState, ... } = this.state;
const shouldDataRendered = !isLoading && !isError && spinnerState === 'fadedOut';
...
return (
{shouldDataRendered && this.children}
{shouldSpinnerRendered && <Spinner ... />}
{shouldEmptyWudgetRendered && <EmptyPlaceHolder emptyText={emptyText} />}
{shouldErrorWidgetRendered && ... }
)
<Block
isLoading={isLoading}
isError={isError}
fetchErrorHandler={fetchMyData}
isEmpty={myData.length}
emptyContent={'no data'}
>
<MyComponent />
</Block>
@supports (display: grid) { ... }