'From Squeak3.2alpha of 14 October 2001 [latest update: #4441] on 22 October 2001 at 11:39:28 am'! "Change Set: scampImgExtent Date: 22 October 2001 Author: Lex Spoon Make Scamper more robust against bad image extents. Probably this kind of thing is a wider problem: #asNumber isn't guaranteed to work."! !HtmlImage methodsFor: 'attributes' stamp: 'ls 10/22/2001 11:14'! imageExtent "the image extent, according to the WIDTH and HEIGHT attributes. returns nil if either WIDTH or HEIGHT is not specified" | widthText heightText | widthText _ self getAttribute: 'width' ifAbsent: [ ^nil ]. heightText _ self getAttribute: 'height' ifAbsent: [ ^nil ]. ^ [ widthText asNumber @ heightText asNumber ] ifError: [ :a :b | nil ]! !