Jump to content
Search Community

'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016

TopGUN121 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

I was using draggable on an SVG element and this was popping up, when testing my work in chrome , this warning pop up in the console log:

 

'SVGElement.offsetWidth' is deprecated and will be removed in M50, around April 2016. See https://www.chromestatus.com/features/5724912467574784 for more details.

 

It was saying it was coming from Draggable.min.js:14.  I was wondering if i should be worried about this warning since i will be using this plugin on svg code during and after that time frame?   Will the plugin will be updated for this or should i not worry?

 

 

Brad

 

  • Like 3
Link to comment
Share on other sites

Good catch TopGUN121.

 

I noticed this as well.. on Firefox Developer Docs for .offsetWidth it shows that the properties offestParent, offsetTop, offsetLeft, offsetWidth, and offsetHeight were deprecated in Chrome 48.

 

https://developer.mozilla.org/en-US/docs/Web/API/SVGElement

 

But looks like Firefox and IE l will still allow it, i couldn't find anywhere on their developer docs about it. :(  I wonder if offestParent, offsetTop, offsetLeft, and offsetHeight will also be deprecated along with offsetWidth ??

 

Thanks, the Honorable Sensei's Jack and Carl will be able to give a definitive answer on this!

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Chrome is always late to the game. Here is one of the Chrome bug report on that very same issue how svg does not support the CSS box model as longson stated above.

 

https://bugs.chromium.org/p/chromium/issues/detail?id=463116

 

Now let's hope WebKit based browsers can follow Firefox's lead on following the spec for SVG, and not allowing SVG graphical elements to be directly rendered with CSS inside <defs> and <symbol> elements.

 

:)

Link to comment
Share on other sites

Than despite this warning inside console, draggable.js functionality would work in new version of chrome?

 

 

We really don't know exactly what Chrome is going to change (for any release). We are aware of the offsetWidth deprecation and will have a replacement. When browsers do introduce new bugs we do our best to fix them as quickly as possible (usually within hours). That said, I don't think you need to be worried. 

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...