Skip to content
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

Move qrcodejs to libraries.yml #10

Open
therealssj opened this issue Mar 30, 2016 · 4 comments
Open

Move qrcodejs to libraries.yml #10

therealssj opened this issue Mar 30, 2016 · 4 comments

Comments

@therealssj
Copy link
Contributor

qrcode js should be in the libraries.yml file.
Currently it is defined in hook_library.

Though we are not using this currently, should we remove this altogether given it requires you to add inline js?

I tried a lot but could not find any info on how to add inline js in drupal 8.

@nerdstein
Copy link
Contributor

In Drupal 7, drupal_add_js could be used to load JS inline (when appropriate). This has been replaced by #attached, seen here: https://www.drupal.org/node/2169605

@therealssj
Copy link
Contributor Author

You can add external libraries but adding inline js gives an error.
A discussion is going on about it here https://www.drupal.org/node/2391025

@nerdstein
Copy link
Contributor

We may need to wait on that until the discussion comes to fruition. In the interim, it may be wise to leave it in the libraries.yml file

@therealssj
Copy link
Contributor Author

One thing we can do is, append the inline js at the end of qrcode.min.js file or create a new file and add that as a library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants