-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#31203] The one way and the one container for store the script options #1319
Conversation
nice tip, need to try... about JSON_FORCE_OBJECT I think it no need cause it convert the non-associative array to object that not really nice in case when you need to have the array in the options |
I meant you're missing P: Your are right about JSON_FORCE_OBJECT. I just copied that from my code :) |
ah hahaha |
pull to staging #3072 |
In current state the developers add the script options as global variables via addScriptDeclaration, that can be not always safe, and not nice. This path allow to store options in the one global object, where the options separated by the extension name.
The options stays as array until header render, that allow to simple overwrite it if need.
Example add the script option:
Access to the options in frontend:
Links: