8346e283ad797ef549be70335d3961f4324901baRyan Grove/**
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @module node
8346e283ad797ef549be70335d3961f4324901baRyan Grove * @submodule node-screen
8346e283ad797ef549be70335d3961f4324901baRyan Grove */
8346e283ad797ef549be70335d3961f4324901baRyan Grove
e56c4e11f404542db23efd22779d04fd7e8ff5eaMatt Sweeney/**
731584898d510b113e8ee729ebdb24f8fdc81c1cAdam Moore * Returns a region object for the node
ee36e3665a248e1adf873352f9ab780cc71d7de0Matt Sweeney * @config region
983e81488c932da470ba33ef46964c7b6b7cfc00Matt Sweeney * @for Node
e56c4e11f404542db23efd22779d04fd7e8ff5eaMatt Sweeney * @type Node
e56c4e11f404542db23efd22779d04fd7e8ff5eaMatt Sweeney */
e56c4e11f404542db23efd22779d04fd7e8ff5eaMatt SweeneyY.Node.ATTRS.region = {
e56c4e11f404542db23efd22779d04fd7e8ff5eaMatt Sweeney getter: function() {
8d6a0e6e73b05c80fc22b4b50dff2985017767ddMatt Sweeney var node = this.getDOMNode(),
b0614bd702ed299874c87fd5d4d48bccda498c73Matt Sweeney region;
b0614bd702ed299874c87fd5d4d48bccda498c73Matt Sweeney
1c01e48c705c687c0439db595e61a9f0d8774b2cMatt Sweeney if (node && !node.tagName) {
1c01e48c705c687c0439db595e61a9f0d8774b2cMatt Sweeney if (node.nodeType === 9) { // document
1c01e48c705c687c0439db595e61a9f0d8774b2cMatt Sweeney node = node.documentElement;
1c01e48c705c687c0439db595e61a9f0d8774b2cMatt Sweeney }
1c01e48c705c687c0439db595e61a9f0d8774b2cMatt Sweeney }
8d6a0e6e73b05c80fc22b4b50dff2985017767ddMatt Sweeney if (Y.DOM.isWindow(node)) {
b0614bd702ed299874c87fd5d4d48bccda498c73Matt Sweeney region = Y.DOM.viewportRegion(node);
b0614bd702ed299874c87fd5d4d48bccda498c73Matt Sweeney } else {
b0614bd702ed299874c87fd5d4d48bccda498c73Matt Sweeney region = Y.DOM.region(node);
b0614bd702ed299874c87fd5d4d48bccda498c73Matt Sweeney }
731584898d510b113e8ee729ebdb24f8fdc81c1cAdam Moore return region;
e56c4e11f404542db23efd22779d04fd7e8ff5eaMatt Sweeney }
e56c4e11f404542db23efd22779d04fd7e8ff5eaMatt Sweeney};
Error!

 

There was an error!

null

java.lang.NullPointerException