Just curious to know...
what does '-moz-binding' do or mean?
what does '-moz-binding' do or mean?
<?xml version = "1.0"?> <bindings xmlns = "http://www.mozilla.org/xbl" xmlns:html = "http://www.w3.org/1999/xhtml"> <binding id = "shy" applyauthorstyles = "false"> <implementation> <constructor> <![CDATA[ function fakeHyphen(container){ for(var i=0; i<container.childNodes.length; i++){ var node = container.childNodes[i]; if (node.nodeType == 3){ var list = node.data.split('\xAD'); var newNode = document.createElement('span'); node.parentNode.replaceChild(newNode,node); newNode.appendChild(document.createTextNode(list[0])); var result; for (var i = 1; i < list.length; i++) { var index = list[i].search(/\s/); var block =[list[i].slice(0,index), list[i].slice(index,list[i].length)]; var parentSpan = document.createElement('span'); parentSpan.appendChild(document.createTextNode('- ')); var childSpan = document.createElement('span'); var textNode = document.createTextNode(block[0]); childSpan.appendChild(textNode); parentSpan.appendChild(childSpan); newNode.appendChild(parentSpan); if (parentSpan.offsetTop == childSpan.offsetTop) { newNode.replaceChild(textNode,parentSpan); }else{ newNode.removeChild(parentSpan); newNode.appendChild(document.createTextNode('- ')); newNode.appendChild(textNode); } newNode.appendChild(document.createTextNode(block[1])); } }else{ fakeHyphen(node); } } } var element = this; fakeHyphen(element); ]]> </constructor> </implementation> </binding> </bindings>
Comment