
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
@expo/browser-polyfill
Advanced tools
Browser polyfill for making React Native compatible with web libs like pixi.js, three.js, phaser.js
Browser polyfill for React Native
yarn add @expo/browser-polyfill
Import the library into your JavaScript file:
import '@expo/browser-polyfill';
DOM is provided with very low support, these are used for libs like pixi.js that validate type.
class Node
class Element
class Document
class HTMLImageElement
class Image
class ImageBitmap
class HTMLVideoElement
class Video
class HTMLCanvasElement
class Canvas
Image has support for loading callbacks, however the loaded uri must be passed to the src already.
const image = new Image();
image.src = '';
image.onload = () => {
const { src, width, height } = image;
};
image.addEventListener('loading', () => {});
image.addEventListener('error', () => {});
const element = document.createElement('div');
const fakeContext = element.getContext('');
element.clientWidth;
element.clientHeight;
element.innerWidth;
element.innerHeight;
element.offsetWidth;
element.offsetHeight;
element.tagName;
element.addEventListener;
element.removeEventListener;
element.setAttributeNS;
element.createElementNS;
node.ownerDocument;
node.className;
node.appendChild;
node.insertBefore;
node.removeChild;
node.setAttributeNS;
node.getBoundingClientRect;
Some external node.js polyfills are added as well.
global.TextEncoder
global.TextDecoder
window.DOMParser
console.time(label);
console.timeEnd(label);
console.count(label);
For debugging base64 image transformations toggle:
global.__debug_browser_polyfill_image = true;
By default global.__debug_browser_polyfill_image
is false.
FAQs
Browser polyfill for making React Native compatible with web libs like pixi.js, three.js, phaser.js
We found that @expo/browser-polyfill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 26 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.