-
Notifications
You must be signed in to change notification settings - Fork 0
.init()
esr360 edited this page Apr 18, 2019
·
3 revisions
sQuery.init({ ...options })
- Used for creating/updating
window.Synergy
object with desired configuration (learn more) - Used for attaching DOM methods to Element/NodeList prototype
Available options:
Option | Type | Default | Info |
---|---|---|---|
elementProto |
Boolean |
true |
Attach sQuery methods to the Element prototype [1] |
nodeListProto |
Boolean |
true |
Attach sQuery methods to the NodeList prototype [1] |
preset |
('Synergy'|'BEM') |
'Synergy' |
Choose a naming convention preset |
Synergy |
Boolean |
true |
Update/create window.Synergy object |
alterMethodName |
Array |
['sQuery'] |
Set to alter method names when using a preset different to 'Synergy'
|
modifierGlue |
String |
undefined |
Overwrite the modifierGule defined by preset
|
componentGlue |
String |
undefined |
Overwrite the componentGlue defined by preset
|
[1]: sQuery will only attach a method to the Element/NodeList prototype if it doesn't already exist - this is never the case using the default Synergy
preset