Opened 10 years ago

Closed 10 years ago

#9784 closed enhancement (fixed)

Remove unnecessary code in parser.js

Reported by: Eugene Lazutkin Owned by: Eugene Lazutkin
Priority: lowest Milestone: 1.4
Component: Parser Version: 1.3.2
Keywords: Cc:
Blocked By: Blocking:

Description

It contains a superficial equality check:

if(dojo.config["parseOnLoad"] == true){
  dojo.parser.parse(); 
}

Can be simplified saving a few bytes and CPU cycles:

if(dojo.config["parseOnLoad"]){
  dojo.parser.parse(); 
}

Change History (5)

comment:1 Changed 10 years ago by Eugene Lazutkin

Milestone: future1.4

comment:2 Changed 10 years ago by Adam Peller

further simplified by changing the property reference to use "." instead of square brackets.

comment:3 in reply to:  2 Changed 10 years ago by Eugene Lazutkin

Replying to peller:

further simplified by changing the property reference to use "." instead of square brackets.

I was hoping it was intentional, but I don't see a compelling reason to keep this style. The file has more examples of that. Will fix soon.

BTW, the original fix was made, but not noted here: [19968].

comment:4 Changed 10 years ago by James Burke

The prop? style is a leftover from an issue from an older browser, IIRC, but yes, we should be able to clean those up to be regular . access.

comment:5 Changed 10 years ago by Eugene Lazutkin

Resolution: fixed
Status: newclosed

Done in [19977].

Note: See TracTickets for help on using tickets.