Slot Machine Javascript Text
The HTML <slot>
element—part of the Web Components technology suite—is a placeholder inside a web component that you can fill with your own markup, which lets you create separate DOM trees and present them together.
Content categories | Flow content, phrasing content |
---|---|
Permitted content | Transparent |
Events | slotchange |
Tag omission | None, both the starting and ending tag are mandatory. |
Permitted parents | Any element that accepts phrasing content |
Implicit ARIA role | No corresponding role |
Permitted ARIA roles | No role permitted |
DOM interface | HTMLSlotElement |
Attributes
This element includes the global attributes.
To play the media, your browser needs to have javascript enabled slot machine Sound Effects (194) Most recent Oldest Shortest duration Longest duration Any Length 2 sec 2 sec - 5 sec 5 sec - 20 sec 20 sec - 1 min 1 min All libraries Radio Mall SFX Bible BLASTWAVE FX Frank Serafine John Leonard Richard Humphries WW Audio Epic Stock Media. . @class Slot. @constructor./ function Slot (el, max, step) this. Speed = 0; //speed of the slot at any point of time: this. Step = step; //speed will increase at this rate: this. Si = null; //holds setInterval object for the given slot: this. El = el; //dom element of the slot: this. MaxSpeed = max; //max speed this slot can have: this.
name
- The slot's name.
- A named slot is a
<slot>
element with aname
attribute.
Examples
Note: You can see this complete example in action at element-details (see it running live). In addition, you can find an explanation at Using templates and slots.
Specifications
Specification | Status | Comments |
---|---|---|
HTML Living Standard The definition of '<slot>' in that specification. | Living Standard | |
DOM The definition of 'Slots' in that specification. | Living Standard |
Browser compatibility
Slot Machine Javascript Text Tutorial
BCD tables only load in the browser