Wrappers-JQuery.st 1009 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Smalltalk createPackage: 'Wrappers-JQuery'!
  2. (Smalltalk packageAt: 'Wrappers-JQuery') imports: {'jQuery' -> 'jquery'}!
  3. Object subclass: #JQuery
  4. instanceVariableNames: ''
  5. package: 'Wrappers-JQuery'!
  6. !JQuery class methodsFor: 'initialization'!
  7. current
  8. ^ jQuery
  9. !
  10. initialize
  11. "Allow JS method calls for the jQuery object.
  12. See boot.js DNU handling."
  13. Smalltalk optOut: jQuery
  14. ! !
  15. !BlockClosure methodsFor: '*Wrappers-JQuery'!
  16. asJQuery
  17. ^ {self} asJQuery
  18. !
  19. asJQueryInContext: aContext
  20. ^ {self} asJQueryInContext: aContext
  21. ! !
  22. !JSObjectProxy methodsFor: '*Wrappers-JQuery'!
  23. asJQuery
  24. <return jQuery(self['@jsObject'])>
  25. !
  26. asJQueryInContext: aContext
  27. <return jQuery(self['@jsObject'], aContext)>
  28. ! !
  29. !Object methodsFor: '*Wrappers-JQuery'!
  30. asJQuery
  31. <return jQuery(self)>
  32. !
  33. asJQueryInContext: aContext
  34. <return jQuery(self, aContext)>
  35. ! !
  36. !String methodsFor: '*Wrappers-JQuery'!
  37. asJQuery
  38. <return jQuery(String(self))>
  39. !
  40. asJQueryInContext: aContext
  41. <return jQuery(String(self), aContext)>
  42. ! !