Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
electron-scroller
Advanced tools
Readme
Electron Scroller is a package designed to manage scrolling of historical pages
in <webview>
tags. Webviews in electron manage page history, offering forward
and back, but when navigating to the pages, the scroll position is lost. This
package allows you to maintain the scroll position and automatically reposition
the page to the proper scroll position upon navigation (back, forward, reload).
To install Electron Scroller, use npm. The preferred method is to install Electron Scroller as an dependency in your app:
npm install --save electron-scroller
It is necessary to include Electron Scroller in two places in your app:
<script>
in the HTML source)<webview preload="file.js"
)<!DOCTYPE html>
<html>
<head>
<title>Browser</title>
</head>
<body>
<div id="buttonBar">
...
</div>
<div id="browser">
<webview id="browserView" preload="preload.js"></webview>
</div>
<script src="browser.js"></script>
</body>
</html>
Require the package and use the add()
method. Pass to add()
a string
containing a single
CSS selector
that describes the specific webview to be managed. If only a single webview
exists, the selector is not required. Because the Scroller hooks
into the methods of the webview, it may be best to call add()
early in the
process and before configuring the webview. In this example, in the file
browser.js
:
const scroller = require('electron-scroller')
onload = function() {
let selector = '#browserView'
scroller.add(selector)
// The selector is not required if there is only a single webview:
// scroller.add()
}
The Scroller has to be included in the preload file by calling the preload()
method. It is not necessary to pass the selector. In this example, in the file
preload.js
:
require('electron-scroller').preload()
FAQs
Manage scrolling of content inside an Electron webview element.
The npm package electron-scroller receives a total of 0 weekly downloads. As such, electron-scroller popularity was classified as not popular.
We found that electron-scroller 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.