Sunday, June 26, 2011

NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7

Since Mibbu framework supports CSS animations, it's good moment to create version exclusively for mobile devices, without using heavy and hard to render canvas, and with very limited JavaScript DOM interactions - CSS FTW! So I remove about 50% of code from original branch and test it on my Samsung Wave (bada has one of the best mobile browsers ever, so that was my starting point). And it simply doesn't work:
NO_MODIFICATION_ALLOWED_ERR: DOM Exception 7
After short research I saw that Allegro ('Polish Ebay') had the same problem on Desktop Chrome months ago. After couple more hours of reading documentation I found a clue, that Webkit is freaking out if you try to put HTML content into style tag. So I switch
var cssStyle = document.createElement('style');
    cssStyle.innerHTML = 'body { color: #000; }';
to
var cssStyle = document.createElement('style');
    cssStyle.innerText = 'body { color: #000; }';
and everything works.

17 comments:

  1. "document.createTextNode" would be the correct and valid for the "W3C"

    ReplyDelete
    Replies
    1. It doesn't make sense, you don't use createTextNode to insert text in your HTML document, do you? Sometimes even if something is 'correct & valid' according to some rules, it doesn't mean it's the best solution.

      Delete
  2. Aw, this was a really great post. In theory I'd like to write like this also - taking time and real effort to make a good article... but what can I say... I procrastinate alot and never seem to get something done. Aplikasi Game iPhone Informasi pc gaming

    ReplyDelete
  3. In such a manner, there is a similarly enormous measure of crowd that is utilizing iOS and anticipating more supportive applications. Uplifting news for you is that there is a bigger opportunity than in Android improvement to make an extraordinary application and take your specialty. Be that as it may, there is likewise an advantage for the individuals who are as of now working with Android, which incorporates the likelihood to cover more clients as iOS clients are as yet a lot of all clients. Furthermore, accordingly you might acquire benefit. You without a doubt will since the individuals who use iOS are prepared to burn through cash on applications. As it shows us details shoppers spend considerably more cash on iOS nearly with Android that prompts 1.8 higher income. Without a doubt it is fantastic!>>> part time ios developer remote

    ReplyDelete
  4. If your startup or business is heading in a direction that very much involves moving into an enterprise product, then you have come across the question of hiring an angular wom. To ensure that this issue is always resolved, your development team needs an angular best ide. Our company is engaged in the selection of engineers from Ukraine who will implement only the most relevant and necessary software solutions for your business.

    ReplyDelete
  5. This comment has been removed by the author.

    ReplyDelete
  6. Do you urgently need dedicated Azure automation engineer for your project? Then hire him here! I strongly recommend that you visit this site if you are interested in such services! Here you can use the services of hiring experienced developers who will definitely help you! Hire services for your project, here! Good luck!

    ReplyDelete
  7. Hello! You no longer need to remember a lot of grammar rules and apply them all the time! Our adjective checker tool is an excellent assistant thanks to which text verification will take a couple of minutes. This is a completely free online tool that will help you make your text look perfect. Our assistant will find absolutely all the mistakes that you made in the use of adjectives.

    ReplyDelete
  8. This comment has been removed by the author.

    ReplyDelete
  9. Hello, fellow writers! Writing is an essential skill that we use in various aspects of our lives, and writing without errors is crucial in communicating our ideas effectively. Online services that help you detect and correct mistakes in your writing can be a game-changer, allowing you to produce work that is polished, professional, and free from errors. Find more info

    ReplyDelete
  10. Did you know that a comma checker is beneficial because it can enhance the comprehensibility and coherence of written communication? Commas are an essential punctuation mark that distinguishes words, phrases, and clauses in a sentence. Incorrect usage of commas can substantially change the intended meaning of the sentence. By using commas accurately, written communication becomes more straightforward to comprehend and follow, thus preventing any perplexity or uncertainty!

    Source: https://www.commacorrector.com/master-complex-punctuation-with-comma-and-semicolon-checker/

    ReplyDelete
  11. A quick solution is required to address the grammar problems that are plaguing your text. Rather than spending money on expensive services or hiring specialists, why not give an online service a try? The best tools like comma colon semicolon checker available will help you correct, check, and edit your text quickly and professionally, without wasting any time or resources. This software is an excellent choice for anyone who values their time and money.

    ReplyDelete
  12. The technical side of business often requires data labeling, which is a crucial function that can enhance work processes. To save money on freelancers, you can take advantage of a top-notch virtual service video data collection. This service provides access to a team of highly skilled data labeling professionals who can adapt to your specific needs and requirements.

    ReplyDelete