Opened 14 years ago

Closed 14 years ago

#5035 closed Task (wontfix)

openTag method doesn't use the attributes arg

Reported by: Alfonso Martínez de Lizarrondo Owned by:
Priority: Normal Milestone:
Component: Core : Output Data Version: SVN (CKEditor) - OLD
Keywords: Discussion Cc:

Description

In both basicWriter and htmlWriter the openTag method doesn't use the attributes parameter:

		openTag : function( tagName, attributes )
		{
			this._.output.push( '<', tagName );
		},

and

		openTag : function( tagName, attributes )
		{
			var rules = this._.rules[ tagName ];

			if ( this._.indent )
				this.indentation();
			// Do not break if indenting.
			else if ( rules && rules.breakBeforeOpen )
			{
				this.lineBreak();
				this.indentation();
			}

			this._.output.push( '<', tagName );
		},

Am I missing something here?

In the calls to the method the attributes are sent, but that could be removed as well as the examples about how to use it.

Change History (2)

comment:1 Changed 14 years ago by Frederico Caldeira Knabben

Keywords: Discussion added
Type: BugTask

If you look at the in-code documentation, you will find the following definition for the attributes parameter:

The attributes defined for this tag. The attributes could be used to inspect the tag.

Probably I just wanted to add this extra feature to the writer. I was just predicting that some custom writers could use the attributes to write things differently. This may be used by a bbcode or wiki-code writer.

We cold remove it until not used by us, but it still looks useful and could be good for others out there, bringing no drawbacks.

Do you see any problem with it?

comment:2 Changed 14 years ago by Alfonso Martínez de Lizarrondo

Resolution: wontfix
Status: newclosed

If it has been added for forwards compatibility that's OK, I just wondered why the parameter was there.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy