
Security News
PodRocket Podcast: Inside the Recent npm Supply Chain Attacks
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
@1milligram/frame
Advanced tools
A React component that wraps an iframe
inside an element:
iframe
is only loaded when it is visible in the screeniframe
is resized automatically when its content resizesDue to the cross domain (CORS) issue, it only supports iframe
whose src
belongs to the same domain of your site.
$ npm install @1milligram/frame
Frame
component:import { Frame } from '@1milligram/frame';
import '@1milligram/frame/lib/styles/index.css';
<Frame url="/path/to/iframe" />;
Setting the frame height
For any reason that you would like to do your own calculation to adjust the frame height:
const setFrameHeight = (doc: Document) => {
// `doc` is the document instance of the iframe content
return doc.body.scrollHeight;
};
<Frame setFrameHeight={setFrameHeight} />;
FAQs
An iframe wrapper that resizes based on its content automatically
We found that @1milligram/frame demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.