File: D:/HostingSpaces/SBogers10/shop.komma.nl/node_modules/@vue/cli-ui/src/mixins/Defer.js
export default function (count = 10) {
// @vue/component
return {
data () {
return {
displayPriority: 0
}
},
mounted () {
this.runDisplayPriority()
},
methods: {
runDisplayPriority () {
this.displayPriority = 0
const step = () => {
requestAnimationFrame(() => {
this.displayPriority++
if (this.displayPriority < count) {
step()
}
})
}
step()
},
defer (priority) {
return this.displayPriority >= priority
}
}
}
}