styleURLs passed to registerModule are being ignored RRS feed

  • Question

  • Microsoft.Maps.registerModule("MyModule", "a.js", {styleURLs:["a.css"]})

    The stylesheets given to the call to registerModule are not being loaded.

    Inspecting the implementation of registerModule, we find a "for" loop constructed thusly:

    for (f = 0, s = r.styleURLs.length; f > s; f++)

    Note the loop condition will never be true.

    Further, external stylesheet references should be included via a "link" element with an href, not a "style" element with content as the current implementation is doing:

    e = document.createElement("style"),
    e.type = "text/css",
    e.textContent = r.styleURLs[f]

    • Edited by Posef Tuesday, June 6, 2017 6:46 PM
    Tuesday, June 6, 2017 6:41 PM


All replies