* Gets called when the browser is not supported. * The default implementation shows the fallback input field and adds * a text.
()
| 413 | * a text. |
| 414 | */ |
| 415 | fallback() { |
| 416 | // This code should pass in IE7... :( |
| 417 | let messageElement; |
| 418 | this.element.className = `${this.element.className} dz-browser-not-supported`; |
| 419 | |
| 420 | for (let child of this.element.getElementsByTagName("div")) { |
| 421 | if (/(^| )dz-message($| )/.test(child.className)) { |
| 422 | messageElement = child; |
| 423 | child.className = "dz-message"; // Removes the 'dz-default' class |
| 424 | break; |
| 425 | } |
| 426 | } |
| 427 | if (!messageElement) { |
| 428 | messageElement = Dropzone.createElement( |
| 429 | '<div class="dz-message"><span></span></div>' |
| 430 | ); |
| 431 | this.element.appendChild(messageElement); |
| 432 | } |
| 433 | |
| 434 | let span = messageElement.getElementsByTagName("span")[0]; |
| 435 | if (span) { |
| 436 | if (span.textContent != null) { |
| 437 | span.textContent = this.options.dictFallbackMessage; |
| 438 | } else if (span.innerText != null) { |
| 439 | span.innerText = this.options.dictFallbackMessage; |
| 440 | } |
| 441 | } |
| 442 | |
| 443 | return this.element.appendChild(this.getFallbackForm()); |
| 444 | }, |
| 445 | |
| 446 | /** |
| 447 | * Gets called to calculate the thumbnail dimensions. |
nothing calls this directly
no test coverage detected
searching dependent graphs…