![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
jsyg-stdconstruct
Advanced tools
Standard constructor for writing JSYG or plugins
npm install jsyg-stdconstruct
import StdConstruct from "jsyg-stdconstruct"
export default class Blink extends StdConstruct {
constructor(selector,opt) {
this.onshow = null
this.onhide = null
this.setNode(selector)
this.frequency = 1000
if (opt) this.enable(opt)
}
show() {
this.node.style.display = "none"
this.trigger("show")
return this
}
hide() {
this.node.style.display = "block"
this.trigger("hide")
return this
}
toggle() {
this[ this.node.style.display == "none" ? "show" : "hide" ]()
}
enable(opt) {
this.disable()
if (opt) this.set(opt)
this.interval = window.setInterval( this.toggle.bind(this), this.frequency )
this.enabled = true
}
disable() {
if (this.interval) window.clearInterval(this.interval)
this.enabled = false
}
}
import Blink from "./blink"
let blink = new Blink('#myElement')
blink.on({
"show" : () => console.log("show")
"hide" : () => console.log("hide")
})
blink.enable({
frequency : 2000
})
If you use JSYG framework, you can register the plugin like this :
let plugin = JSYG.bindPlugin(Blink)
JSYG.prototype.blink = function() { plugin.apply(this,arguments); }
Then you can use your plugin like this :
let $myElmt = JSYG("#myElement")
$myElmt.blink({
frequency : 2000,
onshow : () => console.log("show")
onhide : () => console.log("hide")
})
window.setTimeout( ()=> $myElmt.blink("disable"), 10000 )
FAQs
Standard constructor for writing JSYG plugins
The npm package jsyg-stdconstruct receives a total of 85 weekly downloads. As such, jsyg-stdconstruct popularity was classified as not popular.
We found that jsyg-stdconstruct 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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.