Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pelagiccreatures/sargasso

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pelagiccreatures/sargasso - npm Package Compare versions

Comparing version 0.5.12 to 0.5.13

20

example/test.js

@@ -9,3 +9,3 @@ class myClass extends sargasso.Sargasso {

const frame = () => {
this.element.innerHTML = '<p>Hello There Viewport!'
this.element.innerHTML = '<p>Hello There Viewport! Starting offloaded task in web worker so things are still responsive here.'
this.element.style.color = 'red'

@@ -21,14 +21,14 @@ this.addClass('animated')

const code = `onmessage = function(e) {
console.log('starting web worker work')
for(let i = 0; i < e.data; i++){
// do something 100k times
}
postMessage({status:'ok'})
}`
console.log('starting web worker work')
for(let i = 0; i < e.data; i++){
// do something lots of times
}
postMessage('done counting to ' + e.data)
}`
const worker = this.startWorker('myworkId', code)
worker.onmessage = function (e) {
this.element.innerHTML = 'done counting to 100k'
worker.onmessage = (e) => {
this.element.innerHTML = e.data
this.stopWorker('myworkId')
}
worker.postMessage(1000000)
worker.postMessage(10000000)
}

@@ -35,0 +35,0 @@ }

@@ -306,3 +306,3 @@ /**

startWorker (id, code) {
const blob = new Blob(code, {
const blob = new Blob([code], {
type: 'text/javascript'

@@ -309,0 +309,0 @@ })

{
"name": "@pelagiccreatures/sargasso",
"version": "0.5.12",
"version": "0.5.13",
"description": "Simple, Fast, Reactive, supervised Javascript controllers for html elements.",

@@ -5,0 +5,0 @@ "main": "index.js",

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc