
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
@kitware/trame-iframe
Advanced tools
This library aims to simplify interaction between a trame application living inside an iframe and its iframe parent. This work is inspired by the [official trame-client js lib](https://github.com/Kitware/trame-client/tree/master/js-lib)
This library aims to simplify interaction between a trame application living inside an iframe and its iframe parent.
This work is inspired by the official trame-client js lib
First you need to grab the iframe that contains your trame application.
import ClientCommunicator from "@kitware/trame-iframe";
const iframe = document.getElementById("trame_app");
const iframe_url = "http://localhost:3000";
const trame = new ClientCommunicator(iframe, iframe_url);
// set
trame.state.set("a", 2);
trame.state.set('b', 3);
trame.state.update({
a: 2.5,
b: 3.5,
c: 4.5,
})
// get
console.log(trame.state.get("c"));
console.log(trame.state.get('a'));
// simple api for state change
trame.state.watch(
["a", "b", "c"],
(a, b, c) => {
console.log(`a(${a}) or b(${b}) or c(${c}) have changed`);
}
);
// -----------------------------------
// Method execution API
// -----------------------------------
// method execution on Python side
trame.trigger("name", ['arg_0', 'arg_1'], { kwarg_0: 1, kwarg_1: 2 });
FAQs
This library aims to simplify interaction between a trame application living inside an iframe and its iframe parent. This work is inspired by the [official trame-client js lib](https://github.com/Kitware/trame-client/tree/master/js-lib)
The npm package @kitware/trame-iframe receives a total of 1 weekly downloads. As such, @kitware/trame-iframe popularity was classified as not popular.
We found that @kitware/trame-iframe 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
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.