Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
mscgenjs-inpage
Advanced tools
Embed & render sequence charts in HTML
(1) Reference the mscgen-inpage script in your page head:
<script src="dist/mscgen-inpage.js" defer></script>
The script is also available for inclusion on your page on unpkg, mscgen.js.org and github if you just want to use it for quick testing.
(2) Put your mscgen script in the page, surrounded by a script tag with the
text/x-mscgen
mime type
<script type="text/x-mscgen">
# OpenId Connect protocol
# https://openid.net/specs/openid-connect-core-1_0.html#rfc.section.1.3
msc {
wordwraparcs="true";
eu [label="end-user"],
rp [label="relying party"],
op [label="OpenID provider"];
eu =>> rp [label="log me in"];
rp =>> op [label="authentication request"];
op =>> eu [label="authentication and authorization request"];
eu >> op [label="authenticate and authorize"];
op >> rp [label="authentication response"];
rp =>> op [label="UserInfo request"];
op >> rp [label="UserInfo response"];
rp >> eu [label="Hi. You're logged in with {UserInfo.name}"];
}
</script>
(3) You're done. The script replaces all elements in the page with the class
mscgen_js by a rendered sequence chart. Result for the above msc:
We've used
script
in the sample above, but mscgen_js will work with any element type - and there's even a wikimedia-style<mscgen>
tag - see the mscgen_js embedding guide if you want to do this.
<mscgen>
for rendering.mscgen_js is licensed under the GNU General Public License version 3 ("the GPL").
For using mscgenjs-inpage (in this package: dist/mscgen-inpage.js
) a special
exception to the GPL is made. This is so you can use it to render sequence
charts in documentation which has a different license from the GPL without that
documention (let alone the software it documents, if any) having to be licensed
under the GPL.
As a special exception to the GPL, any HTML file which merely makes function calls to mscgen-inpage.js, and for that purpose includes it by reference shall be deemed a separate work for copyright law purposes. In addition, the copyright holders of this code give you permission to combine this code with free software libraries that are released under the GNU LGPL. You may copy and distribute such a system following the terms of the GNU GPL for this code and the LGPL for the libraries. If you modify this code, you may extend this exception to your version of the code, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
FAQs
Embed and render sequence charts in HTML
We found that mscgenjs-inpage demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.