QuykHtml icon indicating copy to clipboard operation
QuykHtml copied to clipboard

Deprecated method set_img_src (wrong functionality)

Open mwd1993 opened this issue 2 years ago • 0 comments

https://github.com/mwd1993/QuykHtml/blob/38505ba190119c97c18ac652997613f725dbb40b/QuykHtml.py#L1080

This method actually tries to set a link, so the functionality of the method is wrong. Also, we need to update the method doc to let users know this method is Deprecated

Should change the method from:

def set_img_src(self, _str):
            """
            Sets an images source (external url or local url)
            returns: self
            """
            self.add_attribute('src="' + _str + '"')
            return 

To this:

def set_img_src(self, _str):
            """
            (Deprecated - use set_img_background instead)
            Sets an images background
            returns: self
            """
            self.set_img_background(_str)
            return 

Simply rerouting it to the real method 'set_img_background' (though set_img_src is deprecated, we will be keeping it for backwards compatibility)

mwd1993 avatar Oct 15 '22 23:10 mwd1993