[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.javascript

Problem with YUI 3.1.1

Dave \Crash\ Dummy

12/16/2014 5:24:00 PM

Hi all, I've run Google Closure on a large set of third party JS code
that we're using. When turning off warnings and showing just errors,
the following file from YUI 3.1.1 remains:
<http://josephj.com/lab/modev/pkg/production_josephj_201007150922/copy/static/yui/3.1.1/node/node-a...
(also included at the bottom of this message). Closure complains:
"Parse error. 'identifier' expected" about the line with setter, in
the column with the opening parenthesis before val.

Indeed this file does not have a matching number of opening and
closing parentheses and braces. Line 28 with
});
seems to be somewhat superfluous. However, commenting out that line
yields the same error. I don't understand this file at all. What is
the local setter function good for? It's not used locally within get.
Can it be accessed from the outside? Does anyone know how to change
this file in a minimal way so that it still works (in whatever way it
works now) but so that Closure is silenced?

YUI.add('node-aria', function(Y) {

/**
* Aria support for Node
* @module node
* @submodule node-aria
*/

Y.Node.prototype.get = function(name) {
var val;
if (re_aria.test(name)) {
val = Y.Node.getDOMNode(this).getAttribute(name, 2);
} else {

}

setter: function(val) {
Y.Node.getDOMNode(this).setAttribute(name, val);
return val;
}
});
};


}, '3.1.1' ,{requires:['node-base']});
4 Answers

Christoph M. Becker

12/16/2014 6:12:00 PM

0

Stefan Jansen wrote:

> Hi all, I've run Google Closure on a large set of third party JS code
> that we're using. When turning off warnings and showing just errors,
> the following file from YUI 3.1.1 remains:
> <http://josephj.com/lab/modev/pkg/production_josephj_201007150922/copy/static/yui/3.1.1/node/node-a...
> (also included at the bottom of this message). Closure complains:
> "Parse error. 'identifier' expected" about the line with setter, in
> the column with the opening parenthesis before val.

Yes, the file is syntactically in error; it seems to me that it has been
corrupted somehow. Besides the empty else clause (which might be an
oversight of the programmer), apparently, there is the start of an
object literal missing before line 17, and also there is no return
statement, even though the name of the method suggest one to be there.

Anyhow, I suggest that you ask in a YUI3 related forum:
<http://yuilibrary.com/forum-archive/forum/inde....

--
Christoph M. Becker

Thomas 'PointedEars' Lahn

12/16/2014 8:59:00 PM

0

Christoph M. Becker wrote:

> Stefan Jansen wrote:
>> Hi all, I've run Google Closure on a large set of third party JS code
>> that we're using. When turning off warnings and showing just errors,
>> the following file from YUI 3.1.1 remains:
>> [â?¦]
>
> Anyhow, I suggest that you ask in a YUI3 related forum:
> <http://yuilibrary.com/forum-archive/forum/inde....

I suggest he gets rid of YUI(3) ASAP because development of it has been
officially discontinued as of 2014-08-29:

<http://yahooeng.tumblr.com/post/96098168666/important-announcement-regardi...

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not cc me. / Bitte keine Kopien per E-Mail.

Christoph M. Becker

12/16/2014 10:29:00 PM

0

Thomas 'PointedEars' Lahn wrote:

> Christoph M. Becker wrote:
>
>> Stefan Jansen wrote:
>>> Hi all, I've run Google Closure on a large set of third party JS code
>>> that we're using. When turning off warnings and showing just errors,
>>> the following file from YUI 3.1.1 remains:
>>> [â?¦]
>>
>> Anyhow, I suggest that you ask in a YUI3 related forum:
>> <http://yuilibrary.com/forum-archive/forum/inde....
>
> I suggest he gets rid of YUI(3) ASAP because development of it has been
> officially discontinued as of 2014-08-29:
>
> <http://yahooeng.tumblr.com/post/96098168666/important-announcement-regardi...

Good point. However, the OP asked explicitly about YUI 3.1.1, whereas
the latest version is 3.18.1. It seems that they can't update now, for
whatever reason.

--
Christoph M. Becker

Thomas 'PointedEars' Lahn

12/16/2014 11:22:00 PM

0

Christoph M. Becker wrote:

> Thomas 'PointedEars' Lahn wrote:
>> I suggest he gets rid of YUI(3) ASAP because development of it has been
>> officially discontinued as of 2014-08-29:
>>
>> <http://yahooeng.tumblr.com/post/96098168666/important-announcemen... regarding-yui>
>
> Good point. However, the OP asked explicitly about YUI 3.1.1, whereas
> the latest version is 3.18.1. It seems that they can't update now, for
> whatever reason.

All the more reason for them to get rid of it ASAP. Their software already
has the security leaks that were fixed from YUI 3.1.2 to 3.18.1. No further
support because of a dead(-ish) dependency only makes it worse.

--
PointedEars
FAQ: <http://PointedEars.... | SVN: <http://PointedEars.de...
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-...
Please do not cc me. / Bitte keine Kopien per E-Mail.