You are here: Reference > JavaScript > client-side > style handling > properties > browser specific extensions > MozBinding
MozBinding style property
Sets or retrieves the URL of the XBL (Extensible Binding Language) file containing the binding.
To delete the binding, first remove the rule that contains the binding from its parent styleSheet,
then refresh the element by removing (removeChild) and re-appending (appendChild or insertBefore) it to its parent node.
Syntax:
You can find the related objects in the Supported by objects section below.
This property is read/write.
CSS page for this property: -moz-binding |
Possible values:
The type of this property is string.
One of the following values:
Where URI specifies the location of the XBL file. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Do not bind anything for this element. |
Default: none.
Example HTML code 1:
This example illustrates the use of the -moz-binding property:
|
|||||
<head> <style> #bindingTest { -moz-binding : url("somexbl.xml#alert-it"); } </style> </head> <body> Move your mouse over <b id="bindingTest">this text</b>. </body> |
|||||
|
|||||
Did you find this example helpful?
|
Example HTML code 2:
This example illustrates the use of the MozBinding property in JavaScript:
|
|||||
<head> <style> #bindingTest { -moz-binding : url("somexbl.xml#alert-it"); } </style> <script type="text/javascript"> var binding = true; function GetBinding () { var sheet = document.styleSheets[0]; var rules = sheet.cssRules ? sheet.cssRules : sheet.rules; alert (rules[0].style.MozBinding); } </script> </head> <body> <b id="bindingTest">Move your mouse over this text</b>. <button onclick="GetBinding ();">Get Binding</button> </body> |
|||||
|
|||||
Did you find this example helpful?
|
Supported by objects:
CSSStyleDeclaration, htmlElement.style
HTML elements:
a, abbr, acronym, address, applet, b, bdo, big, blink, blockquote, body, button, caption, center, cite, code, dd, del, dfn, dir, div, dl, dt, em, embed, fieldset, font, form, h1, h2, h3, h4, h5, h6, hr, html, i, iframe, img, input:button, input:checkbox, input:file, input:image, input:password, input:radio, input:reset, input:submit, input:text, ins, isindex, kbd, keygen, label, legend, li, marquee, menu, object, ol, optgroup, option, p, pre, s, samp, select, small, span, strike, strong, sub, sup, table, tbody, td, textarea, tfoot, th, thead, tr, tt, u, ul, var
External links:
User Contributed Comments