Skip to content

Commit

Permalink
Added comments to some turbo attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrichau committed Aug 23, 2023
1 parent cdf44af commit dbce514
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*Seaside-HotwireTurbo
turbo: aBoolean

"data-turbo=""false"" disables Turbo Drive on links and forms including descendants. To reenable when an ancestor has opted out, use data-turbo=""true"". Be careful: when Turbo Drive is disabled, browsers treat link clicks as normal, but native adapters may exit the app."

self dataAttributeAt: 'turbo' put: aBoolean
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*Seaside-HotwireTurbo
turboAction: aString

(#('replace' 'advance') includes: aString) ifFalse: [
self error. ].
self error: 'Argument for turboAction must be either ''replace'' or ''advance''.' ].
self dataAttributeAt: 'turbo-action' put: aString
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
*Seaside-HotwireTurbo
turboTarget: aString

"data-turbo-frame identifies the Turbo Frame to navigate. Refer to the Frames documentation for further details."

self dataAttributeAt: 'turbo-frame' put: aString
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*Seaside-HotwireTurbo
turboCallback: aNiladicValuable
turboCallback: aNiladicValuable

aNiladicValuable argumentCount > 0 ifTrue: [
GRInvalidArgumentCount signal: 'Anchors expect a niladic callback.' ].
self url addField: (self storeCallback: (WATurboFrameActionCallback on: aNiladicValuable))

0 comments on commit dbce514

Please sign in to comment.