Warning comes from Chrome 45.0.2454.85. Code called into question:
// scroll to the element with id="hash" or name="hash"
function scrollToHash(hash) {
if (!hash) return;
// wait for the browser's scrolling to finish before we scroll to the hash
// ex: http://example.com/#/page1#middle
// the browser will scroll to an element with id or name `/page1#middle` when the page finishes loading. if it doesn't exist
// it will scroll to the top of the page. let the browser finish the current event loop and scroll to the top of the page
// before we scroll to the element with id or name `middle`.
setTimeout(function() {
var hashElement = document.querySelector('html /deep/ ' + hash) || document.querySelector('html /deep/ [name="' + hash.substring(1) + '"]');
if (hashElement && hashElement.scrollIntoView) {
hashElement.scrollIntoView(true);
}
}, 0);
}
See https://www.chromestatus.com/features/6750456638341120 for more details.
Also see W3 and Google Groups.
Warning comes from
Chrome 45.0.2454.85
. Code called into question: