PDA

View Full Version : is this poor practice? (js object oriented method reuse)


evil kev
08-31-2005, 03:19 PM
in one of my forum mods i need to get the offset of an object and since its already written i wish to reuse the vbulletin method that is defined as a method of the vB_Popup_Menu class.

i am merely calling the method literally by using: vB_Popup_Menu.prototype.fetch_offset()
and it is working fine.

as i am not the most experienced js oop coder i was wondering if someone could tell if i am doing something that isnt best practice here? purely for my skills development . ta :)