They're accessed via the window object in the global scope.
I believe there is a slight compatibility issue between webkit distributions for
<script>window.myvar = function() {}</script><!-- followed by -->
<div id="window.myvar"></div>, given that it would map to "window.window.myvar".

But nobody does that... And for good reason, it's too tricky.

The use of the window global to access IDs in the DOM ought just be considered a tool for easy and quick debugging. Any properly written app should use standard DOM methods in deployment.

-Charles

On 12/8/11 1:02 AM, Vicky Tux wrote:

Thanks for your response. But it was not a typical web stuff, it is compatibility issue. Some web applications written to access the elements without getElementById.

Is there any way to implement this stuff on Webkit..? Please give hints regarding this.

-Vicky

On Wed, Dec 7, 2011 at 9:36 PM, Ariya Hidayat <[email protected] <mailto:[email protected]>> wrote:

    > I have facing an issue with Direct DOM  access via "document"
    object.

    Because it is not part of the DOM standard.

    This is elementary web stuff, it would be helpful if you would have
    done some basic research first as this mailing list is not to teach
    people about browser scripting and incompatibilities.



    --
    Ariya Hidayat, http://ariya.ofilabs.com



_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

_______________________________________________
webkit-dev mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev

Reply via email to