Sha256: 2a6eb178558f1746733d1c7723d7bc2228d1f0c11ccb1a8dcae03a4d471baf52

Contents?: true

Size: 548 Bytes

Versions: 3

Compression:

Stored size: 548 Bytes

Contents

var WhowishWordAttributeHandler = WhowishWordContentHandler.extend({
	
  init: function(elem,attributeName){
    this.element = elem;
	this.attributeName = attributeName;
  },
  
  setContent: function(content){
  	
	try {
		this.element[this.attributeName] = content;
	} catch(e) {}
	
	try {
		this.element.attributes[this.attributeName].value = content;
	} catch (e) {}
	
	$w(this.element).attr(this.attributeName, content);
  },
  
  getContent: function(){
    return $(this.element).attr(this.attributeName);
  }
  
});

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
whowish_word-0.1.6 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.1.5 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js
whowish_word-0.1.4 lib/whowish_word/rails/public/javascripts/7_whowish_word_attribute_handler.js