Primary eng (and PM) emails
Summary
Deprecate the attributes offsetParent, offsetTop, offsetLeft, offsetWidth and offsetHeight on SVGElement.
Motivation
We have already removed these attributes from Element, see the intents to deprecate and remove.
Compatibility Risk
In Gecko and Edge, these attributes are only supported on HTMLElement. Nevertheless, there was some breakage when they were removed from Element (see deprecation thread) and it's reasonable to expect something to break now as well. If the breakage is bad we can go back and try to change the specs, of course.
Alternative implementation suggestion for web developers
Use getBoundingClientRect(). It's not a drop-in replacement, however, as it takes transforms into account.
Usage information from UseCounter
offsetParent: https://www.chromestatus.com/metrics/feature/timeline/popularity/887
offsetTop: https://www.chromestatus.com/metrics/feature/timeline/popularity/888
offsetLeft: https://www.chromestatus.com/metrics/feature/timeline/popularity/889
offsetWidth: https://www.chromestatus.com/metrics/feature/timeline/popularity/890
offsetHeight: https://www.chromestatus.com/metrics/feature/timeline/popularity/891
OWP launch tracking bug
Entry on the feature dashboard
https://www.chromestatus.com/features/5724912467574784
Requesting approval to remove too?
No, first deprecate for two release cycles (M48-49), with the deprecation message saying that it will be gone in M50. A separate intent to remove will be sent.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
Looks fine to me.FYI deprecation doesn't need 3 LGTMs.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
As for the deprecation of these APIs, I would suggest a patch be submitted to jQuery, wait for a release that includes the patch, then deprecate in Chrome giving a few months for people to update their jQuery library (or dependent systems like WordPress or the like that uses jQuery). Some users don't have the wherewithal to fix code that depends on this deprecated API in the two months the Chrome team is giving developers to fix this. If it's not a security problem, I don't know what the hurry is to deprecate this (albeit maybe broken) API.
jQuery.expr.filters.visible = function( elem ) { return elem.getClientRects().length > 0; };
I'm also getting this warning when using $('*:visible'). I have worked around it by using this:$('*').filter(function(){return $(this).closest('svg').length == 0;}).filter(':visible:empty')
--
Ok, but then how do you know get the position of the svg element in vanilla javascript?
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
☆PhistucK
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.