Update core.js

Added hasPendingRequests method