Some troubles with Javascript intellisence

I use WebStorm WS-95.480. I've encountered some bugs.

  1. WebStorm doesn't recognize CSSStyleDeclaration class (It uses style stub instead) so that it displays warning whenever I try to write something like this:
    CSSStyleDeclaration.prototype.calculateWidth = function(totalWidth)
    {
         return totalWidth
              - (parseInt(this.marginLeft) + parseInt(this.marginRight))
              - (parseInt(this.borderLeftWidth) + parseInt(this.borderRightWidth))
              - (parseInt(this.paddingLeft) + parseInt(this.paddingRight))
    }
  2. WebStorm doesn't recognize window.atob and window.btoa functions. Here the code to be added to JavascriptLanguage.jar!\com\intellij\lang\javascript\index\predefined\DHTML.js
    /**
    @param {String} encodedData
    @return String
    */
    window.atob = function(encodedData) {};
    /**
    @param {String} decodedData
    @return String
    */
    window.btoa = function(decodedData) {};
  3. Invalid declaration of the function window.showModalDialog
    /**
    @browser IE
    @param {String} sUrl
    @param {Object} [vArguments]
    @param {String} [sFeatures]
    @return style
    */
    window.showModalDialog = function(sUrl,vArguments,sFeatures) {};

    The return value must be of the type Object obtained via window.returnValue
  4. window.console isn't defined.
  5. The Element class doesn't implement the interface ElementTraversal (by the way Maxim Mossienko promised that the issue will be fixed in the next version. The issue is still unsettled however. http://youtrack.jetbrains.net/issue/WI-2618). Just add the next code to the JavascriptLanguage.jar!\com\intellij\lang\javascript\index\predefined\DOMCore.js
    /**
    @type Element
    @const
    */
    Element.firstElementChild = 0;
    /**
    @type Element
    @const
    */
    Element.lastElementChild = 0;
    /**
    @type Element
    @const
    */
    Element.previousElementSibling = 0;
    /**
    @type Element
    @const
    */
    Element.nextElementSibling = 0;
    /**
    @type Number
    @const
    */
    Element.childElementCount = 0;
0

Thank you for the detailed missed members description.
Note, 5 -> Issue http://youtrack.jetbrains.net/issue/WI-2618 is fixed in PhpStorm / WebStorm 2.0

0

2.0? Do you mean 1.0.2?

0

No, I mean what was written


0

And where we can download PhpStorm 2.0?

0

EAP for WebStorm 2.0 will be opened soon.

0

Your request is being tracked via http://youtrack.jetbrains.net/issue/WI-2803

0

请先登录再写评论。