Comments on: SpellingCow followup http://me.eae.net/archive/2006/09/05/spellingcow-followup/ The journal of Emil A Eklund Mon, 21 Aug 2017 00:23:51 +0000 http://wordpress.org/?v=2.0 by: Hakan Bilgin http://me.eae.net/archive/2006/09/05/spellingcow-followup/#comment-5694 Wed, 06 Sep 2006 23:18:38 +0000 http://me.eae.net/archive/2006/09/05/spellingcow-followup/#comment-5694 Hi Emil, Regarding transparent textarea + DIV; I have never liked that idea. A while back, I experimented with adding the contentEditable to Firefox with XBL but was to lazy to finish it. You can see a (buggy) demo of how much it is done, here: http://www.challenger.se/samples/ff_contentEditable.htm Anywho; I have a couple of questions about namespaces and I hope you can help me out. 1. In IE, there is a property named scopeName, which returns the namespace of the element/node. Do you know the equalling property to this in Firefox? Properties such as localName, nodeName, etc returns the namespace with the nodeName united by the colon...but in uppercase. Which I don’t fancy at all...and I am not satisfied with my solution below... --Javascript-------------------------- Node.prototype.__defineGetter__('scopeName', function() { var ln = this.localName.toString(); return (ln.indexOf(':') > -1)? ln.split(':')[0] : 'HTML' ; }); -------------------------------------- 2. Do you know if it is possible to add namespaces to a document programmatically? Thanks is advance... Hi Emil,
Regarding transparent textarea + DIV; I have never liked that idea. A while back, I experimented with adding the contentEditable to Firefox with XBL but was to lazy to finish it. You can see a (buggy) demo of how much it is done, here:
http://www.challenger.se/samples/ff_contentEditable.htm

Anywho; I have a couple of questions about namespaces and I hope you can help me out.

1. In IE, there is a property named scopeName, which returns the namespace of the element/node. Do you know the equalling property to this in Firefox?
Properties such as localName, nodeName, etc returns the namespace with the nodeName united by the colon…but in uppercase. Which I don’t fancy at all…and I am not satisfied with my solution below…

–Javascript————————–

Node.prototype.__defineGetter__(’scopeName’, function() {
var ln = this.localName.toString();
return (ln.indexOf(’:') > -1)? ln.split(’:')[0] : ‘HTML’ ;
});

————————————–

2. Do you know if it is possible to add namespaces to a document programmatically?

Thanks is advance…

]]>