
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@trendmicro/react-iframe
Advanced tools
React Iframe
Demo: https://trendmicro-frontend.github.io/react-iframe
npm install --save react @trendmicro/react-iframe
import Iframe from '@trendmicro/react-iframe';
<Iframe src="index.html" width="100%" height={240} />
import ResizeObserver from 'resize-observer-polyfill';
<Iframe
src="iframe.html"
onLoad={({ event, iframe }) => {
if (!(iframe && iframe.contentDocument)) {
return;
}
const target = iframe.contentDocument.body;
const nextHeight = target.offsetHeight;
iframe.style.height = `${nextHeight}px`;
const observer = new ResizeObserver(entries => {
const target = iframe.contentDocument.body;
const nextHeight = target.offsetHeight;
iframe.style.height = `${nextHeight}px`;
});
observer.observe(target);
}}
/>
Name | Type | Default | Description |
---|---|---|---|
src | string | The src attribute specifies the address of the document to embed in the iframe. | |
width | string or number | '100%' | The width attribute specifies the width of an iframe, in pixels. |
height | string or number | '100%' | The height attribute specifies the height of an iframe, in pixels. |
sandbox | boolean, object, or string | The sandbox attribute enables an extra set of restrictions for the content in the iframe. | |
sandbox.allowForms | boolean | true | Re-enables form submission. |
sandbox.allowModals | boolean | true | Sandboxed frames will block modal dialogs by default. |
sandbox.allowPointerLock | boolean | false | Re-enables APIs. |
sandbox.allowPopups | boolean | true | Re-enables popups. |
sandbox.allowSameOrigin | boolean | true | Allows the iframe content to be treated as being from the same origin. |
sandbox.allowScripts | boolean | true | Re-enables scripts. |
sandbox.allowTopNavigation | boolean | false | Allows the iframe content to navigate its top-level browsing context. |
onLoad | function | Callback invoked when the iframe has been loaded: ({ event: Event, iframe: HTMLElement }) | |
onBeforeUnload | function | Callback invoked when the iframe is about to be unloaded: ({ event: Event, iframe: HTMLElement }) | |
onUnload | function | Callback invoked when the iframe has unloaded: ({ event: Event }) |
MIT
FAQs
React Iframe component
We found that @trendmicro/react-iframe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.