Skip to content

All documents recognized as HTML in Chrome >= 32 #73

@loganfsmyth

Description

@loganfsmyth

The isHTMLDocument feature detection flag is true for XML documents in Chrome 32, so any attempt to use a function that triggers setDocument on an XML element throws "Uncaught TypeError: Cannot set property 'display' of null".

e.g. http://jsfiddle.net/TcyEW/1

The offending code is https://github.com/mootools/slick/blob/master/Source/Slick.Finder.js#L84

// on non-HTML documents innerHTML and getElementsById doesnt work properly
try {
        testNode.innerHTML = '<a id="'+id+'"></a>';
        features.isHTMLDocument = !!document.getElementById(id);
} catch(e){}

This is caused by:
Move 'innerHTML': https://code.google.com/p/chromium/issues/detail?id=311080
Wrong 'id': https://code.google.com/p/chromium/issues/detail?id=315168

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions