Skip to main content
11 events
when toggle format what by license comment
Jan 15, 2020 at 16:00 comment added rebecca mantel Yes I see it is enabled by default in drupal8 what do you suggest then? I actually try to call it from an iframe in the same page
Jan 15, 2020 at 14:27 comment added d70rr3s You mean if you call alert(drupalSettings.pdf_app_height); outside of the behavior you get sometimes undefined but called inside the behavior always returns the proper value? Do you have big_pipe module enabled? If so take in mind that JS are "streamed" to the browser so JS called inside the template could and probably executed first that one attached through the render pipeline.
Jan 15, 2020 at 13:43 history edited avpaderno CC BY-SA 4.0
added 116 characters in body
Jan 15, 2020 at 13:42 history rollback avpaderno
Rollback to Revision 2
Jan 15, 2020 at 13:42 comment added rebecca mantel Please check my new edit..The alert works always inside of the attach but not always when called from outside..
S Jan 15, 2020 at 13:41 history edited rebecca mantel CC BY-SA 4.0
Add some tags
S Jan 15, 2020 at 13:41 history suggested d70rr3s
Add some tags
Jan 15, 2020 at 13:23 comment added Leigh What function are you doing $elements['#attached']['drupalSettings']['pdf_app_height'] = $password; in?
Jan 15, 2020 at 13:23 review Suggested edits
S Jan 15, 2020 at 13:41
Jan 15, 2020 at 13:19 comment added d70rr3s Are you sure that the times it sets undefined on JS has actually a value on the server side? On the other hand #attached is a render array key so if element gets cached you will get the same attached settings every time since the actual element is not rendered again until it's cache is invalidated.
Jan 15, 2020 at 13:14 history asked rebecca mantel CC BY-SA 4.0