API page: http://api.drupal.org/api/drupal/core!includes!common.inc/function/drupal_add_js/8
API page: http://api.drupal.org/api/drupal/includes!common.inc/function/drupal_add_js/7
On the "parameters" paragraph of the documentation, the first line describing the the $data parameter should be (changes/corrections underlined):
$data: (optional) If given, the value depends on the $options[type] parameter:
instead of:
$data: (optional) If given, the value depends on the $options parameter:
P.S.:Since I am relatively new in Drupal development please double-check the correction above before you fix it.
Comment | File | Size | Author |
---|---|---|---|
#12 | minor_documentation_correction-1821024-12.patch | 697 bytes | dermario |
#8 | minor_documentation_correction-1821024-8.patch | 632 bytes | dermario |
#5 | minor_documentation_correction-1821024-5.patch | 630 bytes | mjonesdinero |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedWe need to consider D8 first.
Comment #2
fizk CreditAttribution: fizk commentedSeems to be fixed now.
Comment #3
bitspike CreditAttribution: bitspike commentedI don't see how it is fixed. It looks the same to me. Please explain so I won't reopen issue without a reason.
Comment #4
fizk CreditAttribution: fizk commentedSorry I read the issue description wrong.
Comment #5
mjonesdinero CreditAttribution: mjonesdinero commentedattached is the solution on d8
Comment #6
dermario#5 looks good to me. Patch applys well and changes are made like in issue summary.
Comment #7
jhodgdonGood catch! It needs to say $options['type'] though, not $options[type].
Comment #8
dermariohope thats ok now
Comment #9
dermarioComment #10
fizk CreditAttribution: fizk commentedActually if the options parameter is a string, then it will be interpreted as the type:
So saying
$options['type']
isn't always right.We could say something like
(optional) If given, the value depends on the $options parameter, or $options['type'] if $options is passed as an associative array.
Comment #11
fizk CreditAttribution: fizk commentedComment #12
dermarioOk you are right and your sentence is more precise.
Comment #13
dermarioComment #15
jhodgdon#12: minor_documentation_correction-1821024-12.patch queued for re-testing.
Comment #16
jhodgdonLooks good, thanks! I'll get this committed sometime soon.
Comment #17
jhodgdonSorry for the delay in committing this -- there's a big Views sprint going on and commits are delaying their patch reviews, so postponing a few days.
Comment #18
jhodgdonThanks again! Committed to 8.x and 7.x.
Comment #19.0
(not verified) CreditAttribution: commentedHTML anchor added on API page.